Changed calculation to use ascender, which should work better. (#912)

This commit is contained in:
Adam
2022-04-04 10:38:43 -04:00
committed by GitHub
parent 50acf2e7e6
commit 683d23e3ba
+1 -1
View File
@@ -195,7 +195,7 @@ RenFont* ren_font_load(const char* path, float size, ERenFontAntialiasing antial
font->face = face;
font->size = size;
font->height = (short)((face->height / (float)face->units_per_EM) * font->size);
font->baseline = (short)((face->bbox.yMax / (float)face->units_per_EM) * font->size);
font->baseline = (short)((face->ascender / (float)face->units_per_EM) * font->size);
font->antialiasing = antialiasing;
font->hinting = hinting;
font->style = style;