Improve font rendering

This change fixes uneven glyph heights
This commit is contained in:
Clownacy 2020-09-06 19:40:57 +01:00
parent df42d9300f
commit 34d3b8e664

View file

@ -968,7 +968,7 @@ static CachedGlyph* GetGlyphCached(FontObject *font_object, unsigned long unicod
{
glyph->unicode_value = unicode_value;
glyph->x = font_object->face->glyph->bitmap_left;
glyph->y = (FT_MulFix(font_object->face->ascender, font_object->face->size->metrics.y_scale) - font_object->face->glyph->metrics.horiBearingY + (64 / 2)) / 64;
glyph->y = (FT_MulFix(font_object->face->ascender, font_object->face->size->metrics.y_scale) + (64 / 2)) / 64 - font_object->face->glyph->bitmap_top;
glyph->x_advance = font_object->face->glyph->advance.x / 64;
FT_Bitmap bitmap;