Skip to content

Commit 9109135

Browse files
committed
Update FontUtils.java
1 parent a7d4618 commit 9109135

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/main/java/io/github/intisy/utils/utils/FontUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66

77
@SuppressWarnings("unused")
88
public class FontUtils {
9-
public static Font loadFont(String fontPath, int fontSize) {
9+
public static Font loadFont(File fontPath, int fontSize) {
1010
try {
11-
return Font.createFont(Font.TRUETYPE_FONT, new File(fontPath)).deriveFont(Font.PLAIN, fontSize);
11+
return Font.createFont(Font.TRUETYPE_FONT, fontPath).deriveFont(Font.PLAIN, fontSize);
1212
} catch (FontFormatException | IOException e) {
1313
throw new RuntimeException(e);
1414
}

0 commit comments

Comments
 (0)