From c80099f89383f9bc4638cb60ecd43219b71fc5aa Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Fri, 31 Jul 2020 09:22:16 +0300 Subject: Text: Removing the baseline offset hack --- src/ui/text.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/ui') diff --git a/src/ui/text.c b/src/ui/text.c index dee693e4..1b483952 100644 --- a/src/ui/text.c +++ b/src/ui/text.c @@ -59,15 +59,13 @@ struct Impl_Font { int baseline; iHash glyphs; iBool enableKerning; - int baselineOffset; enum iFontId symbolsFont; /* font to use for symbols */ }; static iFont *font_Text_(enum iFontId id); -static void init_Font(iFont *d, const iBlock *data, int height, int bloff, enum iFontId symbolsFont) { +static void init_Font(iFont *d, const iBlock *data, int height, enum iFontId symbolsFont) { init_Hash(&d->glyphs); - d->baselineOffset = bloff; d->data = NULL; d->height = height; iZap(d->font); @@ -171,7 +169,6 @@ void init_Text(SDL_Renderer *render) { init_Font(font, fontData[i].ttf, fontData[i].size, - i == 0 ? fontSize_UI / 18 : 0, fontData[i].symbolsFont); if (fontData[i].ttf == &fontFiraMonoRegular_Embedded) { font->enableKerning = iFalse; @@ -262,7 +259,6 @@ static void cache_Font_(iFont *d, iGlyph *glyph, int hoff) { &glyph->d[hoff].y, NULL, NULL); - glyph->d[hoff].y += d->baselineOffset; tex = SDL_CreateTextureFromSurface(render, surface); glRect->size = init_I2(surface->w, surface->h); } -- cgit v1.2.3