mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-04 09:18:38 +00:00
GRAPHICS: Render TTF glyphs at the right locations.
Or at least using the fields used by the FreeType examples.
This commit is contained in:
parent
9a13b34549
commit
92327c7991
@ -395,11 +395,11 @@ bool TTFFont::cacheGlyph(Glyph &glyph, FT_UInt &slot, uint chr) {
|
||||
|
||||
FT_Glyph_Metrics &metrics = _face->glyph->metrics;
|
||||
|
||||
glyph.xOffset = ftFloor26_6(metrics.horiBearingX);
|
||||
glyph.xOffset = _face->glyph->bitmap_left;
|
||||
int xMax = glyph.xOffset + ftCeil26_6(metrics.width);
|
||||
glyph.yOffset = _ascent - ftFloor26_6(metrics.horiBearingY);
|
||||
glyph.yOffset = _ascent - _face->glyph->bitmap_top;
|
||||
|
||||
glyph.advance = ftCeil26_6(metrics.horiAdvance);
|
||||
glyph.advance = ftCeil26_6(_face->glyph->advance.x);
|
||||
|
||||
// In case we got a negative xMin we adjust that, this might make some
|
||||
// characters make a bit odd, but it's the only way we can assure no
|
||||
|
Loading…
x
Reference in New Issue
Block a user