GNOME Bugzilla – Bug 677090
wrong rendering of thai strings using zero width spaces
Last modified: 2012-08-25 19:34:43 UTC
The bug has been described in https://bugzilla.gnome.org/show_bug.cgi?id=674924 Basically nautilus adds "\xE2\x80\x8B" chars after "." to help wrapping which leads the rendering issue with thai as showed in https://launchpadlibrarian.net/102651819/Screenshot%201.png pango version: 1.30
one file example: https://launchpadlibrarian.net/102969878/Test%20Document%20%E0%B8%A1%E0%B8%B5%E0%B8%A0%E0%B8%B2%E0%B8%A9%E0%B8%B2%E0%B9%84%E0%B8%97%E0%B8%A2-%E0%B8%94%E0%B9%89%E0%B8%A7%E0%B8%A2.txt (the filename is "Test Document มีภาษาไทย-ด้วย.txt")
This is why I hate current Pango shaper design. Anyway, here you go. Untested. diff --git a/modules/thai/thai-fc.c b/modules/thai/thai-fc.c index 80c945d..3a447e5 100644 --- a/modules/thai/thai-fc.c +++ b/modules/thai/thai-fc.c @@ -233,6 +233,9 @@ thai_make_glyph_uni (ThaiFontInfo *font_info, gunichar uc) PangoGlyph result; PangoFcFont *fc_font = (PangoFcFont *)font_info->font; + if (pango_is_zero_width (uc)) + return PANGO_GLYPH_EMPTY; + result = pango_fc_font_get_glyph (fc_font, uc); if (result) return result;
Feel free to commit to Pango master.
The patch fixes the issue indeed!
That module is gone. Fixed in HarfBuzz.