[1mdiff --git a/src/ui/text.c b/src/ui/text.c[m
[1mindex cdcff6ab..c36fceb5 100644[m
[1m--- a/src/ui/text.c[m
[1m+++ b/src/ui/text.c[m
[36m@@ -108,6 +108,8 @@[m [mstatic void init_Font(iFont *d, const iBlock *data, int height, float scale,[m
d->height = height;[m
iZap(d->font);[m
stbtt_InitFont(&d->font, constData_Block(data), 0);[m
[32m+[m[32m int ascent, descent;[m
[32m+[m[32m stbtt_GetFontVMetrics(&d->font, &ascent, &descent, NULL);[m
d->xScale = d->yScale = stbtt_ScaleForPixelHeight(&d->font, height) * scale;[m
if (d->isMonospaced) {[m
/* It is important that monospaced fonts align 1:1 with the pixel grid so that[m
[36m@@ -120,10 +122,8 @@[m [mstatic void init_Font(iFont *d, const iBlock *data, int height, float scale,[m
d->xScale *= floorf(advance) / advance;[m
}[m
}[m
[31m- d->vertOffset = height * (1.0f - scale) / 2; [m
[31m- int ascent;[m
[31m- stbtt_GetFontVMetrics(&d->font, &ascent, NULL, NULL);[m
[31m- d->baseline = /ceil/(ascent * d->yScale);[m
[32m+[m[32m d->vertOffset = height * (1.0f - scale) / 2;[m
[32m+[m[32m d->baseline = ascent * d->yScale;[m
d->symbolsFont = symbolsFont;[m
d->japaneseFont = regularJapanese_FontId;[m
d->koreanFont = regularKorean_FontId;[m
[36m@@ -797,6 +797,13 @@[m [mstatic iRect run_Font_(iFont *d, enum iRunMode mode, iRangecc text, size_t maxLe[m
src.h -= over;[m
dst.h -= over;[m
}[m
[32m+[m[32m if (dst.y < pos.y) {[m
[32m+[m[32m const int over = pos.y - dst.y;[m
[32m+[m[32m dst.y += over;[m
[32m+[m[32m dst.h -= over;[m
[32m+[m[32m src.y += over;[m
[32m+[m[32m src.h -= over;[m
[32m+[m[32m }[m
SDL_RenderCopy(text_.render, text_.cache, &src, &dst);[m
}[m
xpos += advance;[m
text/plain
This content has been proxied by September (3851b).