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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -195,7 +195,7 @@ RenFont* ren_font_load(const char* path, float size, ERenFontAntialiasing antial
font->face = face; font->face = face;
font->size = size; font->size = size;
font->height = (short)((face->height / (float)face->units_per_EM) * font->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->antialiasing = antialiasing;
font->hinting = hinting; font->hinting = hinting;
font->style = style; font->style = style;