File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -80,6 +80,8 @@ TFontHelper = class(TNoConstructObject)
80
80
@return Handle to cloned font. Caller is responsible for releasing the
81
81
handle.
82
82
}
83
+ class function GetDefaultFontSize : Integer;
84
+ class function GetDefaultContentFontSize : Integer;
83
85
strict private
84
86
const
85
87
FallbackFontName = ' Arial' ; // Fallback font name
@@ -158,6 +160,32 @@ class function TFontHelper.FontExists(const FontName: string): Boolean;
158
160
Result := Screen.Fonts.IndexOf(FontName) >= 0 ;
159
161
end ;
160
162
163
+ class function TFontHelper.GetDefaultContentFontSize : Integer;
164
+ var
165
+ Font: TFont;
166
+ begin
167
+ Font := TFont.Create;
168
+ try
169
+ SetContentFont(Font);
170
+ Result := Font.Size;
171
+ finally
172
+ Font.Free;
173
+ end ;
174
+ end ;
175
+
176
+ class function TFontHelper.GetDefaultFontSize : Integer;
177
+ var
178
+ Font: TFont;
179
+ begin
180
+ Font := TFont.Create;
181
+ try
182
+ SetDefaultFont(Font);
183
+ Result := Font.Size;
184
+ finally
185
+ Font.Free;
186
+ end ;
187
+ end ;
188
+
161
189
class function TFontHelper.IsInCommonFontSizeRange (
162
190
const FontSize: Integer): Boolean;
163
191
begin
You can’t perform that action at this time.
0 commit comments