From 79f24b44b75d29b855629397894ecf7c8ad9b7fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Mon, 13 Mar 2023 20:11:14 +0100 Subject: [PATCH] Do not calculate rect of Sprite from fonts on stage. --- .../com/jpexs/decompiler/flash/tags/DefineSpriteTag.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineSpriteTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineSpriteTag.java index 03cbe177d..8d7730d1c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineSpriteTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineSpriteTag.java @@ -27,6 +27,7 @@ import com.jpexs.decompiler.flash.tags.base.BoundedTag; import com.jpexs.decompiler.flash.tags.base.CharacterIdTag; import com.jpexs.decompiler.flash.tags.base.CharacterTag; import com.jpexs.decompiler.flash.tags.base.DrawableTag; +import com.jpexs.decompiler.flash.tags.base.FontTag; import com.jpexs.decompiler.flash.tags.base.PlaceObjectTypeTag; import com.jpexs.decompiler.flash.tags.base.RemoveTag; import com.jpexs.decompiler.flash.tags.base.RenderContext; @@ -267,6 +268,12 @@ public class DefineSpriteTag extends DrawableTag implements Timelined { } } } + if (characterId != -1 && swf != null) { + //Do not handle Fonts as characters. TODO: make this better + if (swf.getCharacter(characterId) instanceof FontTag) { + characterId = -1; + } + } if (characterId == -1) { continue; }