diff --git a/CHANGELOG.md b/CHANGELOG.md index a4472e3dd..3050e7a6f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ All notable changes to this project will be documented in this file. - [#2094] AS3 Missing use namespace - [#2094] AS3 missing star type on var and const - [#2094] AS3 Getting register names from debug info - do not allow assigning `_locX_` name to other register than X +- [#2094] Embed font name taken from the fontTag, not DefineFontName ## [19.0.0] - 2023-10-01 ### Added diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/InstanceInfo.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/InstanceInfo.java index 4233c1161..b64dfbe2d 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/InstanceInfo.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/InstanceInfo.java @@ -126,7 +126,8 @@ public class InstanceInfo { } writer.appendNoHilight("[Embed(source=\"" + ASSETS_DIR + ct.getCharacterExportFileName() + ".ttf\",").newLine(); - writer.appendNoHilight("fontName=\"" + ft.getFontName() + "\",").newLine(); + writer.appendNoHilight("fontName=\"" + ft.getFontNameIntag() + "\",").newLine(); + writer.appendNoHilight("fontFamily=\"" + ft.getFontName()+ "\",").newLine(); writer.appendNoHilight("mimeType=\"application/x-font\",").newLine(); writer.appendNoHilight("fontWeight=\"" + (ft.isBold() ? "bold" : "normal") + "\",").newLine(); writer.appendNoHilight("fontStyle=\"" + (ft.isItalic() ? "italic" : "normal") + "\",").newLine();