I’m trying to export a font so that you don’t have to install the font to run the game
it’s working in eclipse but exporting it doesn’t work
the folder structure is as following:
Project_name
/src
-Core(package)
-game(package)
/Fonts
-Origin-Light.ttf
I load the font in with following command:
font = Font.createFont(Font.TRUETYPE_FONT,
new FileInputStream("./Fonts/Origin-Light.ttf"));
in eclipse it’s working just fine, but exporting doesn’t seem to load in the font
edit:
Structure in jar file:
/core
- main.class
- ....
/Fonts
- Origin-Light.ttf
/game
- otherclasses.class
/META-INF
- MANIFEST.MF
/org
/eclipse
some more folders
Put the fonts folder inside of your source folder, I believe that’s the issue:
Resolved in chat, final code: