diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-12-03 15:23:18 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-12-03 15:23:18 +0200 |
commit | 9fde33bb6f8149cc8dee7ac626b8b56f9f1cd14e (patch) | |
tree | 81298b5e8924efb6840738e3768a898edb277e81 /src/ui | |
parent | ec30e00b93b08de5849795ce1359144dfd78c694 (diff) |
Fixed misaligned Unicode box lines
IssueID #82
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/text.c | 3 |
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); |