In my app I've got a "font preview" thing happening, where the user can
click a font name in a ListIconGadget and the font is shown in a StringGadget.
Basically, I'm doing f=LoadFont(1,name$,size) every time the user clicks the
ListIconGadget, and then doing SetGadgetFont(#StringGadget,f) to show it.
My question is: is this safe to do? Like, will the new font replace the old one
because I'm loading it into font number 1 each time? Or should I be doing
CloseFont(1) before loading the new one? I've checked with the Task
Manager and my app's memory usage is steady and doesn't go beserk or
anything, so I assume what I'm doing is safe?
LoadFont question
LoadFont question
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
"PureBasic won't be object oriented, period" - Fred.
help file:
If another font was previously loaded with the same #Font number, then the previous font is automatically freed.
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB - upgrade incoming...)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )

