[truetype] Improve handling of broken sbit advance widths.
* src/truetype/ttgload.c (TT_Load_Glyph): Use the glyph's (scaled) `linearHoriAdvance' if the sbit's `horiAdvance' value is zero. Cf. font `Fixedsys Excelsior' v3.01 (FSEX300.ttf), glyph A, 16ppem.
This commit is contained in:
parent
a25ecfddba
commit
5e094c6fb2
@ -1,3 +1,12 @@
|
||||
2013-06-10 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
[truetype] Improve handling of broken sbit advance widths.
|
||||
|
||||
* src/truetype/ttgload.c (TT_Load_Glyph): Use the glyph's (scaled)
|
||||
`linearHoriAdvance' if the sbit's `horiAdvance' value is zero.
|
||||
|
||||
Cf. font `Fixedsys Excelsior' v3.01 (FSEX300.ttf), glyph A, 16ppem.
|
||||
|
||||
2013-06-10 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
[sfnt] Improve embedded bitmap tracing.
|
||||
|
@ -2224,6 +2224,13 @@
|
||||
glyph->linearHoriAdvance = loader.linear;
|
||||
glyph->linearVertAdvance = loader.top_bearing + loader.bbox.yMax -
|
||||
loader.vadvance;
|
||||
|
||||
/* sanity check: if `horiAdvance' in the sbit metric */
|
||||
/* structure isn't set, use `linearHoriAdvance' */
|
||||
if ( !glyph->metrics.horiAdvance && glyph->linearHoriAdvance )
|
||||
glyph->metrics.horiAdvance =
|
||||
FT_MulFix( glyph->linearHoriAdvance,
|
||||
size->root.metrics.x_scale );
|
||||
}
|
||||
|
||||
return FT_Err_Ok;
|
||||
|
Loading…
Reference in New Issue
Block a user