Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class FontLoader {
- public static Font loadFont(String path, float size){
- try {
- return Font.createFont(Font.TRUETYPE_FONT, new File(path)).deriveFont(Font.PLAIN, size);
- } catch (FontFormatException | IOException e) {
- e.printStackTrace();
- System.exit(1);
- }
- return null;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement