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,
107107 // / <remarks>Method of IHiliteAttrs.</remarks>
108108 function GetFontSize : Integer;
109109 // / <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>
111115 procedure SetFontSize (const AFontSize: Integer);
112116 // / <summary>Resets highlighter font name and size to default values.
113117 // / </summary>
@@ -307,7 +311,10 @@ procedure THiliteAttrs.SetFontName(const AFontName: string);
307311
308312procedure THiliteAttrs.SetFontSize (const AFontSize: Integer);
309313begin
310- fFontSize := AFontSize;
314+ if TFontHelper.IsInCommonFontSizeRange(AFontSize) then
315+ fFontSize := AFontSize
316+ else
317+ fFontSize := cDefFontSize;
311318end ;
312319
313320{ THiliteElemAttrs }
You can’t perform that action at this time.
0 commit comments