From 8b36cc1b54cbe039032411ee1c7d9c8e23e8a903 Mon Sep 17 00:00:00 2001 From: Joel16 Date: Thu, 22 Nov 2018 23:48:59 -0600 Subject: [PATCH] Fix font heights in GUI --- gui/source/SDL_FontCache.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/gui/source/SDL_FontCache.c b/gui/source/SDL_FontCache.c index 3e07ea8..1f289e4 100644 --- a/gui/source/SDL_FontCache.c +++ b/gui/source/SDL_FontCache.c @@ -922,13 +922,9 @@ Uint8 FC_LoadFontFromTTF(FC_Font* font, SDL_Renderer* renderer, TTF_Font* ttf, T font->ttf_ext = ext; //font->line_height = TTF_FontLineSkip(ttf); - font->height = TTF_FontHeight(ttf); + font->height = TTF_FontHeight(ttf) + 0.16666666666 * TTF_FontHeight(ttf); font->ascent = TTF_FontAscent(ttf); font->descent = -TTF_FontDescent(ttf); - - // Some bug for certain fonts can result in an incorrect height. - if(font->height < font->ascent - font->descent) - font->height = font->ascent - font->descent; font->baseline = font->height - font->descent; font->default_color = color;