We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a7d4618 commit 9109135Copy full SHA for 9109135
1 file changed
src/main/java/io/github/intisy/utils/utils/FontUtils.java
@@ -6,9 +6,9 @@
6
7
@SuppressWarnings("unused")
8
public class FontUtils {
9
- public static Font loadFont(String fontPath, int fontSize) {
+ public static Font loadFont(File fontPath, int fontSize) {
10
try {
11
- return Font.createFont(Font.TRUETYPE_FONT, new File(fontPath)).deriveFont(Font.PLAIN, fontSize);
+ return Font.createFont(Font.TRUETYPE_FONT, fontPath).deriveFont(Font.PLAIN, fontSize);
12
} catch (FontFormatException | IOException e) {
13
throw new RuntimeException(e);
14
}
0 commit comments