diff options
author | Christopher Zimmermann <madroach@gmerlin.de> | 2020-07-31 00:07:26 +0200 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2020-09-22 22:00:38 +0000 |
commit | 0447b81053d4ccaa1e1b0087bf6076abae431cae (patch) | |
tree | 68d01d6b182984339903b4fc2e59902555ad86f4 | |
parent | 747c58aa17b9adc016aed0caab049417a20f0b22 (diff) |
fix sign of sTypoDescender
-rw-r--r-- | write.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -942,7 +942,7 @@ writehhea(FILE* out, FontPtr font) writeULONG(out, 0x00010000); /* version */ writeSHORT(out, FONT_UNITS_CEIL(font->metrics.ascent)); /* ascender */ - writeSHORT(out, 0-FONT_UNITS_CEIL(font->metrics.descent)); /* descender */ + writeSHORT(out, -FONT_UNITS_CEIL(font->metrics.descent)); /* descender */ writeSHORT(out, 0); /* lineGap */ writeUSHORT(out, FONT_UNITS(font->metrics.maxAwidth)); /* advanceWidthMax */ /* TODO: the next three are not calculated according to spec, are they ? @@ -1121,11 +1121,11 @@ writeOS2(FILE* out, FontPtr font) writeUSHORT(out, 0x20); /* usFirstCharIndex; */ writeUSHORT(out, 0xFFFD); /* usLastCharIndex; */ writeUSHORT(out, FONT_UNITS_CEIL(font->metrics.ascent)); /* sTypoAscender; */ - writeUSHORT(out, FONT_UNITS_FLOOR(font->metrics.descent)); /* sTypoDescender; */ + writeUSHORT(out, -FONT_UNITS_CEIL(font->metrics.descent)); /* sTypoDescender; */ writeUSHORT(out, 0); /* sTypoLineGap; */ #ifdef NO_TYPO_METRICS writeUSHORT(out, FONT_UNITS_CEIL(font->metrics.ascent)); /* usWinAscent; */ - writeUSHORT(out, FONT_UNITS_FLOOR(font->metrics.descent)); /* usWinDescent; */ + writeUSHORT(out, FONT_UNITS_CEIL(font->metrics.descent)); /* usWinDescent; */ #else writeUSHORT(out, FONT_UNITS_CEIL(font->metrics.maxY)); /* usWinAscent; */ writeUSHORT(out, -FONT_UNITS_FLOOR(font->metrics.minY)); /* usWinDescent; */ |