I am currently developing an application for Windows 8.1 and OSX Yosemite.
Firemonkey uses Segoe UI (12) and Helvetica (13) as the default font family and size.
Does someone know a way to change those default settings or completely deactive them:
Because the default fonts have different font sizes (12 and 13) it's hard to get an equal look and feel.
As you can see the other sizes all look pretty equal except default.
If you want to display a font with text size 12 in OSX you would have to do that by runtime. That's because if you set text size 12 in designer it would automatically switch to (Default) and change it to 13 when compiling for mac.
Open any Word document. Right-click somewhere in the document and choose “Font”. In the Font dialog box, select your preferred typeface and any other settings you want to change (e.g., font size). Click the “Set As Default” button.
You can change the default font and size by replacing the IFMXSystemFontService:
unit My.FontService;
interface
uses
FMX.Platform;
type
TmyFMXSystemFontService = class(TInterfacedObject, IFMXSystemFontService)
public
function GetDefaultFontFamilyName: string;
function GetDefaultFontSize: Single;
end;
implementation
function TmyFMXSystemFontService.GetDefaultFontFamilyName: string;
begin
Result := 'Lato';
end;
function TmyFMXSystemFontService.GetDefaultFontSize: Single;
begin
Result := 12;
end;
procedure InitFont;
begin
if TPlatformServices.Current.SupportsPlatformService(IFMXSystemFontService) then
TPlatformServices.Current.RemovePlatformService(IFMXSystemFontService);
TPlatformServices.Current.AddPlatformService(IFMXSystemFontService, TmyFMXSystemFontService.Create);
end;
initialization
InitFont;
end.
The default font size (in XE10, don't know for XE7) is
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With