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 635391 - Pango ignores ZWJ for OTF GSUB Ligatures
Pango ignores ZWJ for OTF GSUB Ligatures
Status: RESOLVED OBSOLETE
Product: pango
Classification: Platform
Component: general
1.28.x
Other Linux
: Normal normal
: ---
Assigned To: pango-maint
pango-maint
Depends on:
Blocks:
 
 
Reported: 2010-11-20 23:15 UTC by Petr Tomasek
Modified: 2012-08-18 17:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Testing OTF font (2.66 KB, application/octet-stream)
2010-11-20 23:15 UTC, Petr Tomasek
Details
Font source file (5.29 KB, text/plain)
2010-11-20 23:17 UTC, Petr Tomasek
Details
Test file (plaintext - utf-8) (18 bytes, text/plain)
2010-11-20 23:17 UTC, Petr Tomasek
Details

Description Petr Tomasek 2010-11-20 23:15:45 UTC
Created attachment 174929 [details]
Testing OTF font

OTF GSUB Ligatures which are composed of some glyphs "connected" using U+200D ZERO WIDTH JOINER (ZWJ) don't work with pango.

I'm attaching very simple OTF font created to demonstrate this bug. Also attached is very simple file with the following sequences:

AB
A<ZWJ>B
BA
B<ZWJ>A

The font has following ligatures (in the 'ccmp' GSUB table):

A + <ZWJ> + B => C
B + A => D

So it should be displayed as follows:

AB
C
D
BA

But in reality it shows:

AB
AB
D
BA

Pango version: pango-1.28.1-4.fc14

BTW, QT based application (like KWrite) don't have this bug. :-)
Comment 1 Petr Tomasek 2010-11-20 23:17:03 UTC
Created attachment 174930 [details]
Font source file
Comment 2 Petr Tomasek 2010-11-20 23:17:53 UTC
Created attachment 174931 [details]
Test file (plaintext - utf-8)
Comment 3 Behdad Esfahbod 2010-11-23 18:42:57 UTC
Actually, according to Unicode, I expect the correct output to be:

AB
C
D
D

Ie. a ZWJ should be ignored when matching ligatures.  Though it's hard to know what to do if we want to handle both the "C" case and the "D" case.

Any idea how Uniscribe on windows does it?
Comment 4 Pravin Satpute 2010-11-26 05:15:22 UTC
Yes, This should be really allowed even for indic as well.
I faced lots of problem to handle some specific requirement for Kannada and Malayalam Script in Lohit Fonts


https://bugzilla.redhat.com/show_bug.cgi?id=576105#c14

Lohit Kannada with Added rules with ZWJ can be find from http://koji.fedoraproject.org/koji/buildinfo?buildID=206044 source rpm is also there. I will be happy to do testing or any other help required in fixing this.
Comment 5 Behdad Esfahbod 2012-08-18 17:37:49 UTC
We've merged the HarfBuzz branch.  Closing obsolete.