summaryrefslogtreecommitdiff
path: root/src/ui/text.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-12-03 15:23:18 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-12-03 15:23:18 +0200
commit9fde33bb6f8149cc8dee7ac626b8b56f9f1cd14e (patch)
tree81298b5e8924efb6840738e3768a898edb277e81 /src/ui/text.c
parentec30e00b93b08de5849795ce1359144dfd78c694 (diff)
Fixed misaligned Unicode box lines
IssueID #82
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);