From c1140f54c47810ccf84b85d8c7b83d6ad5cd786b Mon Sep 17 00:00:00 2001 From: Fabienne Ducroquet Date: Tue, 12 Apr 2016 21:02:36 +0200 Subject: [PATCH] Compute correct number of cells with CONFIG_COMBINE Otherwise, there are unnecessary spaces at the end of lines in tables containing combining characters. Signed-off-by: Fabienne Ducroquet --- src/document/html/renderer.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/document/html/renderer.c b/src/document/html/renderer.c index 00971f7a..b7b358ba 100644 --- a/src/document/html/renderer.c +++ b/src/document/html/renderer.c @@ -651,7 +651,12 @@ good_char: unicode_val_T data; data = utf8_to_unicode(&chars, end); +#ifdef CONFIG_COMBINE + if (data == UCS_SOFT_HYPHEN + || (data != UCS_NO_CHAR && wcwidth((wchar_t)data) == 0)) +#else if (data == UCS_SOFT_HYPHEN) +#endif continue; if (data == UCS_NO_BREAK_SPACE