looking through this document about registering bmfonts, i used the BMFonts tool linked to create my custom font which was exported as an .fnt file. however, renpy seems to have a problem whenever i try to implement my custom font.
at first, i tried to register the font as the document states
Code: Select all
init python:
renpy.register_bmfont(name="myfont", size=256, bold=False, italics=False, underline=False, filename="gui/fonts/myfont.fnt")
label start:
jade "This text is supposed to be {font=myfont}YELLOW{/font}!"
Code: Select all
I'm sorry, but an uncaught exception occurred.
While running game code:
File "renpy/common/00start.rpy", line 207, in script call
call _gl_test
File "renpy/common/00gltest.rpy", line 390, in script
$ __gl_test()
File "renpy/common/00gltest.rpy", line 390, in <module>
$ __gl_test()
File "renpy/common/00gltest.rpy", line 317, in _m1_00gltest__gl_test
_gl_performance_test()
File "renpy/common/00gltest.rpy", line 342, in _gl_performance_test
ui.interact(suppress_underlay=True, suppress_overlay=True)
OSError: Couldn't find file 'myfont_0.png'.
so then i find this forum post and tried to do what they did
Code: Select all
# init python:
# renpy.register_bmfont(name="myfont", size=256, bold=False, italics=False, underline=False, filename="gui/fonts/myfont.fnt")
# this has been commented out
label start:
jade "This text is supposed to be {font=gui/fonts/myfont.fnt}YELLOW{/font}!"
Code: Select all
I'm sorry, but an uncaught exception occurred.
While running game code:
File "game/minigames.rpy", line 474, in script
jade "This text is supposed to be {font=gui/fonts/myfont.fnt}YELLOW{/font}!"
FreetypeError: 2: b'unknown file format'
here is a link to the fnt file in question (lemmasoft doesnt seem to support .fnt attachments): https://drive.google.com/file/d/1bGX0RK ... sp=sharing
im not sure if im doing something wrong with the code or if the file is truly corrupted. any advice would be greatly appreciated!
thank you