Code: Select all
If LoadFont(0, "Conso111las", 10)
SetGadgetFont(#Combo1, FontID(0))
Else
If LoadFont(0, "Courier New", 10)
SetGadgetFont(#Combo1, FontID(0))
EndIf
EndIf
Code: Select all
If LoadFont(0, "Conso111las", 10)
SetGadgetFont(#Combo1, FontID(0))
Else
If LoadFont(0, "Courier New", 10)
SetGadgetFont(#Combo1, FontID(0))
EndIf
EndIf
On Windows the font mapper will always attempt to locate a font. If a font name which does not exist such as: "Tim Now Ronin", is used, then the font mapper will attempt to find the closest match. This will be based upon such criteria as: the font name, the font height, the style and so forth. Therefore, the assumption can not be made that a font will not be loaded, due only to an incorrect font name, size, ect...
Code: Select all
LoadFont(0, "Conso111las", 10)
SetGadgetFont(#Combo1, FontID(0))
Code: Select all
hFont = CreateFont_(16, 0, 0, 0, #FW_NORMAL, 0, 0, 0, #DEFAULT_CHARSET, #OUT_DEFAULT_PRECIS, #CLIP_DEFAULT_PRECIS, #PROOF_QUALITY, #DEFAULT_PITCH, @"Consolas")
If hFont