From 66c357833b2ce0b6cf9fcb48535b4cd8a12b4d5a Mon Sep 17 00:00:00 2001 From: Roland Heyder Date: Wed, 17 Jul 2024 11:33:55 +0200 Subject: [PATCH] Font presets - preset default custom fonts by platform, not all have lucon.ttf available --- source/ide/ide_methods.bas | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/ide/ide_methods.bas b/source/ide/ide_methods.bas index 17a6d8093..a3422053e 100644 --- a/source/ide/ide_methods.bas +++ b/source/ide/ide_methods.bas @@ -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)