Fixed #1748 Wrong matching of DefineEditText fonts for rendering

This commit is contained in:
Jindra Petřík
2021-11-15 19:12:43 +01:00
parent 4a41d97553
commit a342bf7c78
3 changed files with 24 additions and 3 deletions

View File

@@ -584,6 +584,20 @@ public final class SWF implements SWFContainerItem, Timelined {
return null;
}
public FontTag getFontByNameInTag(String fontName) {
if (fontName == null) {
return null;
}
for (Tag t : getTags()) {
if (t instanceof FontTag) {
if (fontName.equals(((FontTag) t).getFontNameIntag())) {
return (FontTag) t;
}
}
}
return null;
}
public FontTag getFont(int fontId) {
CharacterTag characterTag = getCharacters().get(fontId);
if (characterTag instanceof FontTag) {