Skip to content

Commit

Permalink
fix font path issues
Browse files Browse the repository at this point in the history
  • Loading branch information
chompa111 committed Oct 16, 2022
1 parent 7aeaff4 commit d3472f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/graphical/basics/gobject/Fonts.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ public class Fonts {
JETBRAINS_MONO = pathToFont("/fonts/JetBrainsMono-Regular.ttf");
}

private static Font pathToFont(String s) {
private static Font pathToFont(String path) {
try {
return Font.createFonts(Objects.requireNonNull(Fonts.class.getResourceAsStream("/fonts/cmunbi.ttf")))[0];
return Font.createFonts(Objects.requireNonNull(Fonts.class.getResourceAsStream(path)))[0];
} catch (FontFormatException | IOException e) {
e.printStackTrace();
}
Expand Down

0 comments on commit d3472f5

Please sign in to comment.