For the past few day, i have been developing a multiplayer shooter. Obviously, it needs some kind of gui. I wanted various fonts and font styles to be used so i tried to load a font and show some text with it.
However, it threw the following error at me:
OSError: Could not load font file: SatellaRegular.ttf
After a couple hours of scowering the internet i found absolutely nothing, so i decided to post here.
Below is a minimum reproducible example, and the font in question (though i dont think it will be of much help
The two files are in the same directory.
Minimum reproducible example:
from direct.showbase.ShowBase import ShowBase from direct.gui.DirectGui import * from direct.gui.OnscreenText import OnscreenText class MyApp(ShowBase): def __init__(self): ShowBase.__init__(self) fontloader = loader.loadFont('SatellaRegular.ttf') app = MyApp() app.run()
And finally the font(if you need it):
*the website just opens a file dialog and downloads there