mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-07-15 21:48:12 +00:00
[#1348] Cannot properly export frame with cyrillic symbols to SVG
This commit is contained in:
@@ -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))) {
|
||||
|
||||
@@ -74,7 +74,7 @@ public class SVGExporter {
|
||||
|
||||
public Map<Tag, String> exportedTags = new HashMap<>();
|
||||
|
||||
public Map<Tag, Map<Character, String>> exportedChars = new HashMap<>();
|
||||
public Map<Tag, Map<Integer, String>> exportedChars = new HashMap<>();
|
||||
|
||||
private final Map<String, Integer> lastIds = new HashMap<>();
|
||||
|
||||
|
||||
@@ -736,11 +736,11 @@ public abstract class TextTag extends DrawableTag {
|
||||
char ch = font.glyphToChar(entry.glyphIndex);
|
||||
|
||||
String charId = null;
|
||||
Map<Character, String> chs;
|
||||
Map<Integer, String> 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);
|
||||
|
||||
Reference in New Issue
Block a user