Skip to content

Commit

Permalink
fix again idk
Browse files Browse the repository at this point in the history
  • Loading branch information
Joalor64GH authored Nov 27, 2024
1 parent 6e86a7d commit 0d97bc2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion source/backend/Localization.hx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class Localization {
}

public static function loadCustomFont(language:String):String {
var path:String = Paths.file('languages/fonts/' + language);
var path:String = Paths.file('languages/fonts/' + language + '.ttf');
if (Paths.exists(path)) {
trace('custom font loaded for $language: $path');
return customFontPath = path;
Expand Down
4 changes: 2 additions & 2 deletions source/backend/Paths.hx
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ class Paths {
return file('songs/$key/chart.json');

inline static public function font(key:String) {
var path:String = Localization.getCustomFont() ?? file('fonts/$key');
var path:String = file('fonts/$key');

if (path.extension() == '') {
if (exists(path.withExtension("ttf")))
Expand All @@ -175,7 +175,7 @@ class Paths {
path = path.withExtension("otf");
}

return path;
return Localization.getCustomFont() ?? path;
}

inline static public function image(key:String, ?cache:Bool = true):FlxGraphic
Expand Down

0 comments on commit 0d97bc2

Please sign in to comment.