diff --git a/CHANGELOG.md b/CHANGELOG.md index bb48fdb5d..3a6da53dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ All notable changes to this project will be documented in this file. ### Fixed - [#1327] P-code editing: error message and syntax highlighting fixed when instruction name contains upper cased letter - [#1343] AS 1/2 direct editation critical bug +- [#1348] Cannot properly export frame with cyrillic symbols to SVG ## [10.0.0] - 2016-12-24 ### Added diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/FrameExporter.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/FrameExporter.java index 68d3fae11..eecca7d31 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/FrameExporter.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/FrameExporter.java @@ -201,7 +201,7 @@ public class FrameExporter { final Color fbackgroundColor = null; new RetryTask(() -> { int frame = fframes.get(fi); - File f = new File(foutdir + File.separator + frame + ".svg"); + File f = new File(foutdir + File.separator + (frame + 1) + ".svg"); try (OutputStream fos = new BufferedOutputStream(new FileOutputStream(f))) { ExportRectangle rect = new ExportRectangle(tim.displayRect); rect.xMax *= settings.zoom; @@ -361,7 +361,7 @@ public class FrameExporter { } else { for (Integer frame : fframes) { new RetryTask(() -> { - File f = new File(foutdir + File.separator + frame + ".swf"); + File f = new File(foutdir + File.separator + (frame + 1) + ".swf"); Frame fn = (Frame) tim.getFrame(frame); try (OutputStream fos = new BufferedOutputStream(new FileOutputStream(f))) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/commonshape/SVGExporter.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/commonshape/SVGExporter.java index 974aabedd..c29249a94 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/commonshape/SVGExporter.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/commonshape/SVGExporter.java @@ -74,7 +74,7 @@ public class SVGExporter { public Map exportedTags = new HashMap<>(); - public Map> exportedChars = new HashMap<>(); + public Map> exportedChars = new HashMap<>(); private final Map lastIds = new HashMap<>(); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/TextTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/TextTag.java index 4dccc9851..8908be962 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/TextTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/TextTag.java @@ -736,11 +736,11 @@ public abstract class TextTag extends DrawableTag { char ch = font.glyphToChar(entry.glyphIndex); String charId = null; - Map chs; + Map chs; if (exporter.exportedChars.containsKey(font)) { chs = exporter.exportedChars.get(font); - if (chs.containsKey(ch)) { - charId = chs.get(ch); + if (chs.containsKey(entry.glyphIndex)) { + charId = chs.get(entry.glyphIndex); } } else { chs = new HashMap<>(); @@ -753,7 +753,7 @@ public abstract class TextTag extends DrawableTag { SVGShapeExporter shapeExporter = new SVGShapeExporter(swf, shape, exporter, null, colorTransform, zoom); shapeExporter.export(); exporter.endGroup(); - chs.put(ch, charId); + chs.put(entry.glyphIndex, charId); } Element charImage = exporter.addUse(mat, bounds, charId, null);