` Printed Icetips Article

Icetips Article



Par2: Embedding font in an app
2004-09-01 -- David Bratovich
 
I have used (hand coded program)  a couple of  API calls to load and unload a font as
needed. I've used it for my Geek Clock program to load a digital font for a clock LED type
of display.




!In your map
AddFontResource(*cstring),SIGNED,PASCAL,RAW,NAME('AddFontResourceA')
RemoveFontResource(*cstring),BOOL,PASCAL,RAW,NAME('RemoveFontResourceA')

!somewhere in the code before opening the window that will use this font...
font name = 'SFD2.TTF'
W# = AddFontResource(font name)

! Now OK to open window 

! other code here...

! before shutting down and after CLOSE(WINDOW)
W# = RemoveFontResource(font name)



Printed November 23, 2024, 8:11 pm
This article has been viewed/printed 35339 times.