Code: Alles auswählen
If OpenWindow(0, 0, 0, 400, 200, "Loading font...", #PB_Window_SystemMenu | #PB_Window_ScreenCentered) And CreateGadgetList(WindowID(0))
If LoadFont(1, "Bitstream Vera Sans Mono", 24)
SetGadgetFont(#PB_Default, FontID(1))
TextGadget(0, 10, 10, 400, 200, "LoadFont on Linux")
EndIf
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf
Code: Alles auswählen
InitSprite()
InitKeyboard()
OpenWindow(0, 0, 0, 800, 600, "Linux Font", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
OpenWindowedScreen(WindowID(0), 0, 0, 800, 600, 0, 0, 0)
LoadFont(0, "Bitstream Vera Sans Mono", 24)
Repeat
ClearScreen(0)
ExamineKeyboard()
StartDrawing(ScreenOutput())
DrawingMode(#PB_2DDrawing_Transparent)
DrawingFont(FontID(0))
DrawText(100, 100, "Testtext - LoadFont() under Linux", $FFFFFF)
StopDrawing()
FlipBuffers()
Until KeyboardPushed(#PB_Key_Escape)
End