Skip to content

Commit b49a339

Browse files
committed
Fix fonts for windows
1 parent fdebf93 commit b49a339

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

haxe/ui/backend/AssetsBase.hx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,9 @@ class AssetsBase {
4848
}
4949

5050
private function getFontInternal(resourceId:String, callback:FontInfo->Void):Void {
51-
if (Reflect.hasField(Assets.fonts, resourceId)) {
52-
callback({ data: cast Reflect.field(Assets.fonts, resourceId) });
51+
var font = Assets.fonts.get(resourceId);
52+
if (font != null) {
53+
callback({ data: font });
5354
} else {
5455
callback(null);
5556
}

0 commit comments

Comments
 (0)