diff --git a/CHANGELOG.md b/CHANGELOG.md index a8ad111a9..4f5758e06 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,7 @@ All notable changes to this project will be documented in this file. - [#2207] AS - Index -2 out of bounds for some of the switches - [#2190] AS1/2 - for..in inside switch before break - Raw edit of fonts - shape table was not visible +- [#2211] PDF export, Font export - glyphs with no contours (advance only) ### Changed - [#2185] MochiCrypt no longer offered for auto decrypt, user needs to choose variant from "Use unpacker" menu @@ -3396,6 +3397,7 @@ Major version of SWF to XML export changed to 2. [#2203]: https://www.free-decompiler.com/flash/issues/2203 [#2207]: https://www.free-decompiler.com/flash/issues/2207 [#2190]: https://www.free-decompiler.com/flash/issues/2190 +[#2211]: https://www.free-decompiler.com/flash/issues/2211 [#2206]: https://www.free-decompiler.com/flash/issues/2206 [#2100]: https://www.free-decompiler.com/flash/issues/2100 [#2123]: https://www.free-decompiler.com/flash/issues/2123 diff --git a/lib/gnujpdf.jar b/lib/gnujpdf.jar index 093be79f3..ec095f311 100644 Binary files a/lib/gnujpdf.jar and b/lib/gnujpdf.jar differ diff --git a/lib/ttf.jar b/lib/ttf.jar index 744adaa01..64ca2391b 100644 Binary files a/lib/ttf.jar and b/lib/ttf.jar differ diff --git a/libsrc/ffdec_lib/lib/gnujpdf.jar b/libsrc/ffdec_lib/lib/gnujpdf.jar index 093be79f3..ec095f311 100644 Binary files a/libsrc/ffdec_lib/lib/gnujpdf.jar and b/libsrc/ffdec_lib/lib/gnujpdf.jar differ diff --git a/libsrc/ffdec_lib/lib/ttf.jar b/libsrc/ffdec_lib/lib/ttf.jar index 744adaa01..64ca2391b 100644 Binary files a/libsrc/ffdec_lib/lib/ttf.jar and b/libsrc/ffdec_lib/lib/ttf.jar differ diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/DualPdfGraphics2D.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/DualPdfGraphics2D.java index a71ec12eb..c17f5a842 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/DualPdfGraphics2D.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/DualPdfGraphics2D.java @@ -609,11 +609,8 @@ public class DualPdfGraphics2D extends Graphics2D implements BlendModeSetable, G int spacing = entry.glyphAdvance - calcAdvance; char ch = font.glyphToChar(entry.glyphIndex); if (spacing != 0) { - if (text.length() > 0) { - drawText(x, y, trans, textColor, existingFonts, font, text.toString(), textHeight, pdfGraphics); - } - drawText(x + deltaX, y, trans, textColor, existingFonts, font, "" + currentChar, textHeight, pdfGraphics); - + text.append(currentChar); + drawText(x, y, trans, textColor, existingFonts, font, text.toString(), textHeight, pdfGraphics); text = new StringBuilder(); x = x + deltaX + entry.glyphAdvance; deltaX = 0; diff --git a/libsrc/ttf/src/org/doubletype/ossa/module/GlyphFile.java b/libsrc/ttf/src/org/doubletype/ossa/module/GlyphFile.java index 5271989dc..dd5b69a33 100644 --- a/libsrc/ttf/src/org/doubletype/ossa/module/GlyphFile.java +++ b/libsrc/ttf/src/org/doubletype/ossa/module/GlyphFile.java @@ -267,14 +267,12 @@ public class GlyphFile { public TTGlyph toSimpleGlyph() { // convert the file into array of contours EContour[] contours = toContours(); - if ((contours == null) && (!isRequiredGlyph())) { - return null; - } - + TTGlyph retval = new TTGlyph(); retval.setSimple(true); retval.setAdvanceWidth(getAdvanceWidth()); + //JPEXS if (contours == null) { return retval; } diff --git a/libsrc/ttf/src/org/doubletype/ossa/module/TypefaceFile.java b/libsrc/ttf/src/org/doubletype/ossa/module/TypefaceFile.java index cdf30fa66..31d4d0e13 100644 --- a/libsrc/ttf/src/org/doubletype/ossa/module/TypefaceFile.java +++ b/libsrc/ttf/src/org/doubletype/ossa/module/TypefaceFile.java @@ -474,13 +474,18 @@ public class TypefaceFile extends GlyphFile { glyph = createCompoundGlyph(a_glyphFile, a_writer); } - if (glyph == null && a_glyphFile.isWhiteSpace()) { + /*if (glyph == null && a_glyphFile.isWhiteSpace()) { glyph = new TTGlyph(); } if (glyph == null) { return; + }*/ + //JPEXS + if (glyph == null) { + glyph = new TTGlyph(); } + int glyphIndex = a_writer.addGlyph(glyph); long unicode = a_glyphFile.getUnicode(); diff --git a/libsrc/ttf/src/org/doubletype/ossa/truetype/PostWriter.java b/libsrc/ttf/src/org/doubletype/ossa/truetype/PostWriter.java index e7eee79ab..1eb98ba25 100644 --- a/libsrc/ttf/src/org/doubletype/ossa/truetype/PostWriter.java +++ b/libsrc/ttf/src/org/doubletype/ossa/truetype/PostWriter.java @@ -49,7 +49,7 @@ public class PostWriter extends FontFormatWriter { public void write() throws IOException { // table version number - writeFixed32(1.0); + writeFixed32(3.0); //JPEXS - 3.0 = no postscript table set writeFixed32(10.0); // italic angle writeFWord(0); // underline pos writeFWord(60); // underline thickness