truetypefs: fall back to width if advance is zero
combining marks will have zero advance, but it results in zero-width glyphs in subfonts. fall back to width so something meaningful is rendered even if its not combined properly.
This commit is contained in:
parent
3a41ce3bf3
commit
aec4240c0c
1 changed files with 4 additions and 1 deletions
|
@ -186,7 +186,10 @@ compilesub(TFont *f, TSubfont *s)
|
|||
*p++ = 0;
|
||||
*p++ = h;
|
||||
*p++ = gs[i]->xminpx;
|
||||
*p++ = gs[i]->advanceWidthpx;
|
||||
if(gs[i]->advanceWidthpx != 0)
|
||||
*p++ = gs[i]->advanceWidthpx;
|
||||
else
|
||||
*p++ = gs[i]->width;
|
||||
x += gs[i]->width;
|
||||
}
|
||||
*p++ = x;
|
||||
|
|
Loading…
Reference in a new issue