Inside NetBeans my custom font loads properly from this set of code but fails to load when I run my program from the executable jar file
code
public static void main(String[] args) {
Arcanus arc = new Arcanus();
try {
Font customFont = Font.createFont(Font.TRUETYPE_FONT, new File("Golden-Sun.ttf")).deriveFont(12f);
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
ge.registerFont(Font.createFont(Font.TRUETYPE_FONT, new File("Golden-Sun.ttf")));
arc.setFont(customFont);
} catch (IOException e) {
e.printStackTrace();
} catch (FontFormatException e) {
e.printStackTrace();
}
}
any help would be apreciated