Fixed: Writing DefineFont2/3 ascent/descent as SI16 - it's UI16

This commit is contained in:
Jindra Petřík
2021-03-26 20:36:29 +01:00
parent 0087cfb05d
commit ddcae86830
3 changed files with 5 additions and 4 deletions

View File

@@ -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

View File

@@ -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));

View File

@@ -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));