From d3472f56d06de7d479df21aeb238508f106dbd5b Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 16 Oct 2022 15:58:54 -0300 Subject: [PATCH] fix font path issues --- src/main/java/graphical/basics/gobject/Fonts.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/graphical/basics/gobject/Fonts.java b/src/main/java/graphical/basics/gobject/Fonts.java index f11c517..6c4919f 100644 --- a/src/main/java/graphical/basics/gobject/Fonts.java +++ b/src/main/java/graphical/basics/gobject/Fonts.java @@ -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(); }