Here example showing the problem:
Code: Select all
FontName$ = "Times New Roman"
If OpenWindow(0, 0, 0, 300, 160, "Loading font...", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
Result = FontRequester(FontName$, 14, 0, RGB(0, 0, 0), #PB_Font_Bold)
If LoadFont(1, SelectedFontName(), SelectedFontSize() )
SetGadgetFont(#PB_Default, FontID(1))
TextGadget(0, 10, 10, 300, 40, SelectedFontName()+" "+Str(SelectedFontSize()) )
EndIf
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf
The font Previews fine when using the FontRequester but does not display as "Times New Roman" in the Text Gadget.
Tested with 64bit PureBasic latest version on Ubuntu 20.04 64 bit and Suse Enterprise Desktop 15.1 64 bit.
Code works under Windoz and OSX
Thank you.