summaryrefslogtreecommitdiff
path: root/src/ui/text.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/text.c')
-rw-r--r--src/ui/text.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ui/text.c b/src/ui/text.c
index a8be1778..686927b1 100644
--- a/src/ui/text.c
+++ b/src/ui/text.c
@@ -735,7 +735,8 @@ static iRect run_Font_(iFont *d, enum iRunMode mode, iRangecc text, size_t maxLe
735 monoAdvance > 0 && !isJapanese_FontId(fontId_Text_(glyph->font)); 735 monoAdvance > 0 && !isJapanese_FontId(fontId_Text_(glyph->font));
736 const float advance = (useMonoAdvance ? monoAdvance : glyph->advance); 736 const float advance = (useMonoAdvance ? monoAdvance : glyph->advance);
737 if (!isMeasuring_(mode)) { 737 if (!isMeasuring_(mode)) {
738 if (useMonoAdvance && dst.w > advance) { 738 if (useMonoAdvance && dst.w > advance && glyph->font != d) {
739 /* Glyphs from a different font may need recentering to look better. */
739 dst.x -= (dst.w - advance) / 2; 740 dst.x -= (dst.w - advance) / 2;
740 } 741 }
741 SDL_RenderCopy(text_.render, text_.cache, (const SDL_Rect *) &glyph->rect[hoff], &dst); 742 SDL_RenderCopy(text_.render, text_.cache, (const SDL_Rect *) &glyph->rect[hoff], &dst);