Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QB64PE v4.1 is now live
#13
(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 + ...
Reply


Messages In This Thread
QB64PE v4.1 is now live - by SMcNeill - 02-23-2025, 07:37 PM
RE: QB64PE v4.1 is now live - by NakedApe - 02-23-2025, 08:19 PM
RE: QB64PE v4.1 is now live - by a740g - 02-25-2025, 01:54 AM
RE: QB64PE v4.1 is now live - by Petr - 02-23-2025, 09:09 PM
RE: QB64PE v4.1 is now live - by Pete - 02-23-2025, 09:32 PM
RE: QB64PE v4.1 is now live - by bert22306 - 02-23-2025, 11:55 PM
RE: QB64PE v4.1 is now live - by Pete - 02-25-2025, 02:59 AM
RE: QB64PE v4.1 is now live - by Abazek - 02-28-2025, 10:19 AM
RE: QB64PE v4.1 is now live - by zaadstra - 02-28-2025, 09:07 PM
RE: QB64PE v4.1 is now live - by TempodiBasic - 03-04-2025, 09:33 AM
RE: QB64PE v4.1 is now live - by James D Jarvis - 03-04-2025, 04:22 PM
RE: QB64PE v4.1 is now live - by BDS107 - 03-07-2025, 02:54 PM
RE: QB64PE v4.1 is now live - by bplus - 03-07-2025, 05:15 PM



Users browsing this thread: 4 Guest(s)