After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 677090 - wrong rendering of thai strings using zero width spaces
wrong rendering of thai strings using zero width spaces
Status: RESOLVED FIXED
Product: pango
Classification: Platform
Component: thai
1.30.x
Other Linux
: Normal normal
: ---
Assigned To: Theppitak Karoonboonyanan
pango-maint
Depends on:
Blocks:
 
 
Reported: 2012-05-30 11:31 UTC by Sebastien Bacher
Modified: 2012-08-25 19:34 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sebastien Bacher 2012-05-30 11:31:42 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
Comment 1 Sebastien Bacher 2012-05-30 11:32:38 UTC
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")
Comment 2 Behdad Esfahbod 2012-05-30 11:34:53 UTC
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;
Comment 3 Behdad Esfahbod 2012-05-30 11:35:21 UTC
Feel free to commit to Pango master.
Comment 4 Sebastien Bacher 2012-05-30 11:44:47 UTC
The patch fixes the issue indeed!
Comment 5 Behdad Esfahbod 2012-08-25 19:34:43 UTC
That module is gone.  Fixed in HarfBuzz.