03-07-2025, 05:15 PM
(03-07-2025, 02:54 PM)BDS107 Wrote: I was hoping we could change the screen fonts in SCREEN 0.
See also previous post: https://qb64phoenix.com/forum/showthread.php?tid=2662
@BDS107 There is example in Wiki for Screen 0
Code: (Select All)
fontpath$ = Environ$("SYSTEMROOT") + "\fonts\lucon.ttf" 'Find Windows Folder Path.
Do: Cls
Do
style$ = "MONOSPACE"
Print
Input "Enter A FONT Size 8 TO 25: ", fontsize%
Loop Until fontsize% > 7 And fontsize% < 26
Do
Print
Input "Enter (0) for REGULAR OR (1) for ITALIC FONT: ", italic%
Loop Until italic% = 0 Or italic% = 1
Do
Print
Input "Enter (0) for REGULAR OR (1) for BOLD FONT: ", bold%
Loop Until italic% = 0 Or italic% = 1
If italic% = 1 Then style$ = style$ + ", ITALIC"
If bold% = 1 Then style$ = style$ + ", BOLD"
GoSub ClearFont
font& = _LoadFont(fontpath$, fontsize%, style$)
_Font font&
Print
Print "This is your LUCON font! Want to try another STYLE?(Y/N): ";
Do: Sleep: K$ = UCase$(InKey$): Loop Until K$ = "Y" Or K$ = "N"
Loop Until K$ = "N"
GoSub ClearFont
Print "This is the QB64 default _FONT 16!"
End
ClearFont:
If font& > 0 Then
_Font 16 'select inbuilt 8x16 default font
_FreeFont font&
End If
Return
It worked for me on Windows OS.
b = b + ...