1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-09-08 00:40:17 +00:00

Font presets

- preset default custom fonts by platform, not all have lucon.ttf available
This commit is contained in:
Roland Heyder 2024-07-17 11:33:55 +02:00
parent 9487cfedf5
commit 66c357833b

View file

@ -197,7 +197,13 @@ FUNCTION ide2 (ignore)
idecustomfonthandle = _LOADFONT(idecustomfontfile$, idecustomfontheight, "MONOSPACE")
IF idecustomfonthandle < 1 THEN
retval = idemessagebox("Custom font not found!", "Your desired font was not found at the specified location, or is\nof unsupported format. Reverting back to default built-in font.", "#OK")
idecustomfont = 0: idecustomfontfile$ = "C:\Windows\Fonts\lucon.ttf": idecustomfontheight = 21
idecustomfont = 0: idecustomfontheight = 19
IF os$ = "LNX" THEN
idecustomfontfile$ = _DIR$("fonts") + "truetype/liberation/LiberationMono-Regular.ttf"
IF MacOSX THEN idecustomfontfile$ = _DIR$("fonts") + "Courier New.ttf"
ELSE
idecustomfontfile$ = _DIR$("fonts") + "lucon.ttf"
END IF
WriteConfigSetting displaySettingsSection$, "IDE_CustomFont", BoolToTFString$(idecustomfont)
WriteConfigSetting displaySettingsSection$, "IDE_CustomFont$", idecustomfontfile$
WriteConfigSetting displaySettingsSection$, "IDE_CustomFontSize", STR$(idecustomfontheight)