From ddcae8683057cc52960eee4d9270037ed48abec5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Fri, 26 Mar 2021 20:36:29 +0100 Subject: [PATCH] Fixed: Writing DefineFont2/3 ascent/descent as SI16 - it's UI16 --- CHANGELOG.md | 1 + .../src/com/jpexs/decompiler/flash/tags/DefineFont2Tag.java | 4 ++-- .../src/com/jpexs/decompiler/flash/tags/DefineFont3Tag.java | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b9020e0c..1ebd137a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ All notable changes to this project will be documented in this file. ### Fixed - PDF Export - NullPointer when font of text is missing - PDF Export - Text position on font change +- Writing DefineFont2/3 ascent/descent as SI16 - it's UI16 ## [14.3.1] - 2021-03-25 ### Fixed diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFont2Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFont2Tag.java index 21a5d334c..c2368b1c5 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFont2Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFont2Tag.java @@ -298,8 +298,8 @@ public class DefineFont2Tag extends FontTag { } } if (fontFlagsHasLayout) { - sos.writeSI16(fontAscent); - sos.writeSI16(fontDescent); + sos.writeUI16(fontAscent); + sos.writeUI16(fontDescent); sos.writeSI16(fontLeading); for (int i = 0; i < numGlyphs; i++) { sos.writeSI16(fontAdvanceTable.get(i)); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFont3Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFont3Tag.java index ebfdfe6ff..9b20038e3 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFont3Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFont3Tag.java @@ -289,8 +289,8 @@ public class DefineFont3Tag extends FontTag { } } if (fontFlagsHasLayout) { - sos.writeSI16(fontAscent); - sos.writeSI16(fontDescent); + sos.writeUI16(fontAscent); + sos.writeUI16(fontDescent); sos.writeSI16(fontLeading); for (int i = 0; i < numGlyphs; i++) { sos.writeSI16(fontAdvanceTable.get(i));