File tree Expand file tree Collapse file tree
HMCL/src/main/java/org/jackhuang/hmcl/setting Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2929import org .jackhuang .hmcl .util .Lazy ;
3030import org .jackhuang .hmcl .util .Pair ;
3131import org .jackhuang .hmcl .util .io .FileUtils ;
32+ import org .jackhuang .hmcl .util .io .JarUtils ;
3233
3334import java .io .File ;
3435import java .io .IOException ;
@@ -88,7 +89,15 @@ private static Font tryLoadDefaultFont(Path dir) {
8889 if (font != null )
8990 return font ;
9091
91- return tryLoadDefaultFont (Metadata .HMCL_GLOBAL_DIRECTORY );
92+ font = tryLoadDefaultFont (Metadata .HMCL_GLOBAL_DIRECTORY );
93+ if (font != null )
94+ return font ;
95+
96+ Path thisJar = JarUtils .thisJarPath ();
97+ if (thisJar != null && thisJar .getParent () != null )
98+ return tryLoadDefaultFont (thisJar .getParent ());
99+
100+ return null ;
92101 });
93102
94103 public static Theme getTheme () {
You can’t perform that action at this time.
0 commit comments