private Font createFont(String name, float size) {

            Font font = null;
            InputStream fontStream = Main.class.getResourceAsStream("/font/" + name);
            try {
                font = Font.createFont(Font.TRUETYPE_FONT, fontStream);
                font = font.deriveFont(size);
            } catch (FontFormatException | IOException e) {
                e.printStackTrace();
            }

            return font;
        }