From b7a8adc6432154f5fcffd496d533e0810cbb99d2 Mon Sep 17 00:00:00 2001 From: "honfika@gmail.com" Date: Tue, 31 Mar 2015 19:02:56 +0200 Subject: [PATCH] font ascent and descent values should be non-negative --- .../src/com/jpexs/decompiler/flash/tags/DefineFont2Tag.java | 4 ++-- .../src/com/jpexs/decompiler/flash/tags/DefineFont3Tag.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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 e53274ffb..4621e4108 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 @@ -282,8 +282,8 @@ public class DefineFont2Tag extends FontTag { } if (fontFlagsHasLayout) { - fontAscent = sis.readSI16("fontAscent"); - fontDescent = sis.readSI16("fontDescent"); + fontAscent = sis.readUI16("fontAscent"); + fontDescent = sis.readUI16("fontDescent"); fontLeading = sis.readSI16("fontLeading"); fontAdvanceTable = new ArrayList<>(); for (int i = 0; i < numGlyphs; 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 3872ee91f..86af9c754 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 @@ -192,8 +192,8 @@ public class DefineFont3Tag extends FontTag { } } if (fontFlagsHasLayout) { - fontAscent = sis.readSI16("fontAscent"); - fontDescent = sis.readSI16("fontDescent"); + fontAscent = sis.readUI16("fontAscent"); + fontDescent = sis.readUI16("fontDescent"); fontLeading = sis.readSI16("fontLeading"); fontAdvanceTable = new ArrayList<>(); for (int i = 0; i < numGlyphs; i++) {