LoadFont on Linux

Linux specific forum
Foz
Addict
Addict
Posts: 1359
Joined: Tue Nov 13, 2007 12:42 pm
Location: Manchester, UK

LoadFont on Linux

Post by Foz »

Well, I'm not sure if this is a regression on purpose or Ubuntu 10.04 screwing with me.

I could have sworn that in Linux, if you use LoadFont() and supply the exact path to a .ttf file, the ttf file was loaded.

However, when I try this (using the free Bitstream Vera Sans Mono font in this case), I just get the default font that is loaded:

Code: Select all

InitSprite()

OpenWindow (0, 100, 100, 640, 480, "Test")
OpenWindowedScreen(WindowID(0), 0, 0, 640, 480, 0, 0, 0, #PB_Screen_WaitSynchronization)

If LoadFont(1, "/home/foz/Dropbox/VeraMono.ttf", 10) = #False
  MessageRequester("Error", "Failed To load font!")
EndIf

Repeat
  ClearScreen(0)
  
  StartDrawing(ScreenOutput())
  DrawingFont(FontID(1))
  DrawText(0, 0, "This is a test!")
  StopDrawing()
  FlipBuffers()
  
  Select WaitWindowEvent()
    Case #PB_Event_CloseWindow
      quit = #True
  EndSelect
  
Until quit
Is this just Ubuntu 10.04 being crap, or a regression, or me being completely mental and mis-remembering things?
User avatar
idle
Always Here
Always Here
Posts: 6026
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: LoadFont on Linux

Post by idle »

seems to be working for me on 10.04
Windows 11, Manjaro, Raspberry Pi OS
Image
Foz
Addict
Addict
Posts: 1359
Joined: Tue Nov 13, 2007 12:42 pm
Location: Manchester, UK

Re: LoadFont on Linux

Post by Foz »

So I'm not going mental - it isn't a regression, it's my install of Ubuntu that's kicked me for six.

Thank goodness for that! I'll try a reinstall and see if it fixes it.
Post Reply