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 306639 - Zero width characters in arabic shaper
Zero width characters in arabic shaper
Status: RESOLVED FIXED
Product: pango
Classification: Platform
Component: general
1.9.x
Other Linux
: Normal trivial
: 1.8.2
Assigned To: pango-maint
pango-maint
Depends on:
Blocks: Persian
 
 
Reported: 2005-06-06 10:44 UTC by Behnam Esfahbod
Modified: 2005-07-23 19:25 UTC
See Also:
GNOME target: ---
GNOME version: 2.11/2.12


Attachments
Patch that defines pango_is_zero_width for internal use (7.84 KB, patch)
2005-06-14 04:39 UTC, Behdad Esfahbod
none Details | Review
Attached patch defines pango_is_zero_width in Syriac shaper (387 bytes, patch)
2005-06-22 19:16 UTC, Emil Soleyman-Zomalan
none Details | Review
Patch with documentation (8.75 KB, patch)
2005-07-23 18:57 UTC, Behdad Esfahbod
committed Details | Review

Description Behnam Esfahbod 2005-06-06 10:44:35 UTC
Version details: also 1.6.x/2.8
Distribution/Version: Fedora Core 3 and 3.92

Download this file and open it in gedit:
http://www.bamdad.org/~behnam/persian/gedit/gedit-bidi-test-01.txt

You can see [200C] and [200D] character in text area.

I don't know exactly when this bug accures, yet.
Comment 1 Behdad Esfahbod 2005-06-06 14:46:36 UTC
They are not [200C] and [200D], but [202C], [202D], and [202E], ie. PDF, LRO,
and RLO.
Comment 2 Behnam Esfahbod 2005-06-06 16:08:01 UTC
Oops, your right, behdad.  Also I remember some time saw [202A] and [202B], mean
LRE and RLE.

They're not shown always in my fc-3 or fc-3.92.  But testing BidiAssist on a
FreeBSD with GNOME-2.10/GTK-2.6, we saw all of bidi control characters that we
inserted.
Comment 3 Behnam Esfahbod 2005-06-11 13:23:39 UTC
related: http://bugzilla.gnome.org/show_bug.cgi?id=150883
Comment 4 Owen Taylor 2005-06-13 20:55:48 UTC
Compare checks for zero-width characters in arabic_engine_shape()
with ZERO_WIDTH_CHAR() in modules/basic/basic-common.h.

The ZERO_WIDTH_CHAR() macro is already duplicated between the basic
and indic modules, so it probably needs to be moved into the Pango
API in some form, probably just as a convenience function. But
that's not necessary for a basic fix.
Comment 5 Behdad Esfahbod 2005-06-14 04:38:05 UTC
Owen, don't you think these should be removed somewhere out of individual
shapers?  There's mirroring too, that's code duplicated in several modules,
while should be performed no matter which shaper is chosen.
Comment 6 Behdad Esfahbod 2005-06-14 04:39:48 UTC
Created attachment 47739 [details] [review]
Patch that defines pango_is_zero_width for internal use

Attached patch defines pango_is_zero_width in pango-utils.[ch], and all shapers
(basic, Indic, Arabic) use that.
Comment 7 Behdad Esfahbod 2005-06-14 04:41:51 UTC
Behnam, can you test the patch please?
Comment 8 Emil Soleyman-Zomalan 2005-06-22 19:16:18 UTC
Created attachment 48175 [details] [review]
Attached patch defines pango_is_zero_width in Syriac shaper
Comment 9 Behdad Esfahbod 2005-07-23 18:57:35 UTC
Created attachment 49639 [details] [review]
Patch with documentation

Attached is the patch that I'm going to apply.	Added documentation and an
optimization.
Comment 10 Behdad Esfahbod 2005-07-23 19:25:26 UTC
Commited to HEAD:

2005-07-23  Behdad Esfahbod  <pango@behdad.org>

        * pango/pango-utils.c, pango/pango-utils.h (pango_is_zerowidth): New
        function added.

        * modules/basic/basic-common.h, modules/basic/basic-fc.c,
        modules/basic/basic-win32.c, modules/basic/basic-x.c,
        modules/hangul/hangul-fc.c, modules/arabic/arabic-fc.c,
        modules/indic/indic-fc.c, modules/indic/indic-ot.h,
        modules/syriac/syriac-fc.c:  Use the new pango_is_zerowidth function.
        (#306639, Behnam Esfahbod)