From 3fdf121b98d2770ee136ee7e6a03de4384c23eb2 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Fri, 2 Jul 2021 08:10:51 +0300 Subject: Cleanup --- src/ui/text.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/ui/text.c b/src/ui/text.c index 7d141217..cf7f5620 100644 --- a/src/ui/text.c +++ b/src/ui/text.c @@ -1199,6 +1199,7 @@ static iRect run_Font_(iFont *d, const iRunArgs *args) { /* When word wrapping, only consider certain places breakable. */ iChar ch = 0; decodeBytes_MultibyteChar(textPos, runText.end, &ch); + /* TODO: Allow some punctuation to wrap words. */ if (isSpace_Char(ch)) { safeBreak = textPos; } @@ -1231,7 +1232,8 @@ static iRect run_Font_(iFont *d, const iRunArgs *args) { } } } - /* Draw each glyph. */ + /* We have determined a possible wrap position inside the text run, so now we can + draw the glyphs. */ for (unsigned int i = 0; i < glyphCount; i++) { const hb_glyph_info_t *info = &glyphInfo[i]; const hb_codepoint_t glyphId = info->codepoint; -- cgit v1.2.3