File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -107,7 +107,11 @@ THiliteAttrs = class(TInterfacedObject,
107
107
// / <remarks>Method of IHiliteAttrs.</remarks>
108
108
function GetFontSize : Integer;
109
109
// / <summary>Sets size of highlighter font.</summary>
110
- // / <remarks>Method of IHiliteAttrs.</remarks>
110
+ // / <remarks>
111
+ // / <para>If font size is out of range of supported sizes then the
112
+ // / highlighter font is reset to its default value.</para>
113
+ // / <para>Method of IHiliteAttrs.</para>
114
+ // / </remarks>
111
115
procedure SetFontSize (const AFontSize: Integer);
112
116
// / <summary>Resets highlighter font name and size to default values.
113
117
// / </summary>
@@ -307,7 +311,10 @@ procedure THiliteAttrs.SetFontName(const AFontName: string);
307
311
308
312
procedure THiliteAttrs.SetFontSize (const AFontSize: Integer);
309
313
begin
310
- fFontSize := AFontSize;
314
+ if TFontHelper.IsInCommonFontSizeRange(AFontSize) then
315
+ fFontSize := AFontSize
316
+ else
317
+ fFontSize := cDefFontSize;
311
318
end ;
312
319
313
320
{ THiliteElemAttrs }
You can’t perform that action at this time.
0 commit comments