diff options
Diffstat (limited to 'src/ui/text.c')
-rw-r--r-- | src/ui/text.c | 6 |
1 files changed, 1 insertions, 5 deletions
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 { | |||
59 | int baseline; | 59 | int baseline; |
60 | iHash glyphs; | 60 | iHash glyphs; |
61 | iBool enableKerning; | 61 | iBool enableKerning; |
62 | int baselineOffset; | ||
63 | enum iFontId symbolsFont; /* font to use for symbols */ | 62 | enum iFontId symbolsFont; /* font to use for symbols */ |
64 | }; | 63 | }; |
65 | 64 | ||
66 | static iFont *font_Text_(enum iFontId id); | 65 | static iFont *font_Text_(enum iFontId id); |
67 | 66 | ||
68 | static void init_Font(iFont *d, const iBlock *data, int height, int bloff, enum iFontId symbolsFont) { | 67 | static void init_Font(iFont *d, const iBlock *data, int height, enum iFontId symbolsFont) { |
69 | init_Hash(&d->glyphs); | 68 | init_Hash(&d->glyphs); |
70 | d->baselineOffset = bloff; | ||
71 | d->data = NULL; | 69 | d->data = NULL; |
72 | d->height = height; | 70 | d->height = height; |
73 | iZap(d->font); | 71 | iZap(d->font); |
@@ -171,7 +169,6 @@ void init_Text(SDL_Renderer *render) { | |||
171 | init_Font(font, | 169 | init_Font(font, |
172 | fontData[i].ttf, | 170 | fontData[i].ttf, |
173 | fontData[i].size, | 171 | fontData[i].size, |
174 | i == 0 ? fontSize_UI / 18 : 0, | ||
175 | fontData[i].symbolsFont); | 172 | fontData[i].symbolsFont); |
176 | if (fontData[i].ttf == &fontFiraMonoRegular_Embedded) { | 173 | if (fontData[i].ttf == &fontFiraMonoRegular_Embedded) { |
177 | font->enableKerning = iFalse; | 174 | font->enableKerning = iFalse; |
@@ -262,7 +259,6 @@ static void cache_Font_(iFont *d, iGlyph *glyph, int hoff) { | |||
262 | &glyph->d[hoff].y, | 259 | &glyph->d[hoff].y, |
263 | NULL, | 260 | NULL, |
264 | NULL); | 261 | NULL); |
265 | glyph->d[hoff].y += d->baselineOffset; | ||
266 | tex = SDL_CreateTextureFromSurface(render, surface); | 262 | tex = SDL_CreateTextureFromSurface(render, surface); |
267 | glRect->size = init_I2(surface->w, surface->h); | 263 | glRect->size = init_I2(surface->w, surface->h); |
268 | } | 264 | } |