From b14524215ba2119c1f37787bbd4201d6d00d13df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Thu, 24 Jun 2021 10:08:58 +0200 Subject: [PATCH] render: use cell cols from compose chain, not grapheme MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fcft’s view of how many columns a grapheme cluster is may differ from our own. Make sure the rendered glyph matches the number of columns that were allocated when the cluster was printed. --- render.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/render.c b/render.c index d46cb90b..5bb1023e 100644 --- a/render.c +++ b/render.c @@ -570,10 +570,11 @@ render_cell(struct terminal *term, pixman_image_t *pix, } if (grapheme != NULL) { + cell_cols = composed->width; + composed = NULL; glyphs = grapheme->glyphs; glyph_count = grapheme->count; - cell_cols = grapheme->cols; } }