I downloaded a FNT and PNG file for a font. I have tried multiple different ways of trying to do this and maybe I am just not getting a basic thing.
I created a folder in source called fonts (source/fonts) and placed the files there. This is the same method I use for my images and never had any issues there. In my code, i used:
local emerald_20 = gfx.font.new("fonts/emerald_20.fnt")
then later when I want to use the font I used:
gfx.setFont(emerald_20)
The weird (to me) behavior here is with all that done, when I run the build, the images folder doesn't get added to the build and the pdxinfo file is missing. I delete the font folder, rebuild, and everything works like normal.
So, just like my images folder, I decided to use a subfolder instead of the main folder. I updated the file path to include the subfolder name and the font will not load properly and is just nil.
Am I missing a basic thing or is there a specific way these things need to be handled?
Ok, that's understandable. I removed ".fnt" from the code, but I still am experiencing the behavior of with the "fonts" folder present, my images folder and pdxinfo file are not present when built.
I remove the fonts folder, build again, and the images and pdxinfo file return to the build per normal.
So yea, I was able to use a font from the SDK, which just further confirms it's something either with the files I'm using or the way I am handling them.
For reference I'm going to keep on, but from this post here since that is the post from which I found the font's in the first place.