Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Freefont error
#1
Sad 
Inspired by @grymmjack's comment about the fonts, I looked at "_LoadFont" in the wiki. The first example works, but I want that the output to return to the standard font at the end. Unfortunately, I get an error message with "_FreeFont"; I looked up what the error number says, but I don't know where the error is.

Can anyone tell me where the error is in the program? Thanks!

Code: (Select All)

'Fontuebung mit _LoadFont aus dem Wiki - 27. Juni 2024

Option _Explicit

Dim As String rootpath, fontfile, style
Dim As Long f

rootpath = Environ$("SYSTEMROOT") 'normally "C:\WINDOWS"

fontfile = rootpath + "\Fonts\cour.ttf" 'TTF file in Windows
style = "monospace" 'font style is not case sensitive

f = _LoadFont(fontfile, 30, style)
_Font f

Print "Hello!"

_FreeFont f

End
Reply


Messages In This Thread
Freefont error - by Kernelpanic - 06-27-2024, 07:57 PM
RE: Freefont error - by DSMan195276 - 06-27-2024, 08:02 PM
RE: Freefont error - by Kernelpanic - 06-27-2024, 08:27 PM
RE: Freefont error - by SMcNeill - 06-27-2024, 08:52 PM
RE: Freefont error - by Kernelpanic - 06-28-2024, 02:05 PM
RE: Freefont error - by SMcNeill - 06-28-2024, 02:55 PM
RE: Freefont error - by Pete - 06-28-2024, 04:11 PM
RE: Freefont error - by Kernelpanic - 06-28-2024, 07:31 PM
RE: Freefont error - by Pete - 06-28-2024, 10:03 PM
RE: Freefont error - by bplus - 06-28-2024, 10:38 PM
RE: Freefont error - by Pete - 06-29-2024, 03:26 AM



Users browsing this thread: 7 Guest(s)