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 135753 - Improve Arabic mark positioning
Improve Arabic mark positioning
Status: RESOLVED FIXED
Product: pango
Classification: Platform
Component: general
1.3.x
Other Linux
: Normal normal
: Medium feature
Assigned To: pango-maint
pango-maint
Depends on:
Blocks:
 
 
Reported: 2004-02-29 15:56 UTC by Owen Taylor
Modified: 2012-08-18 17:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Qt 4 rendering Arabic text with Traditional Arabic font (no GPOS) (12.89 KB, image/png)
2008-09-03 20:37 UTC, Khaled Hosny
Details

Description Owen Taylor 2004-02-29 15:56:09 UTC
The positioning of Arabic marks in the absence of GPOS could
be improved by centering marks in some cases; currently
they are always on the left edge of the character. SEe
discussion in bug 117282.

There is a patch in that bug by Soheil Hassas Yeganeh
that fixes this, but the approach doesn't really work with 
PangoOTBuffer, so it will have to be done some other way.
Comment 1 Behdad Esfahbod 2006-01-16 10:16:15 UTC
I'm going to close this as WONTFIX.  If better mark positioning is desired, GPOS should be used.
Comment 2 Khaled Hosny 2008-09-03 20:36:28 UTC
Qt 4 seems to do automatic mark positioning even if there is no GPOS table in the font, I tested it with few Arabic fonts and it seem to get it almost right. May be it worth seeing how they managed to get it. Many Arabic fonts (acually almost all fonts until recently) don't have any GPOS mark positioning, and such support in Pango will be very helpful.
Comment 3 Khaled Hosny 2008-09-03 20:37:46 UTC
Created attachment 117958 [details]
Qt 4 rendering Arabic text with Traditional Arabic font (no GPOS)
Comment 4 Behdad Esfahbod 2008-09-03 20:44:10 UTC
Nice.  Where can I get that font to try?
It isn't hard to do actually.  I may give it a try.
Comment 5 Khaled Hosny 2009-01-27 17:30:41 UTC
I missed this! sorry.

Farsiweb fonts like Titr and Nazli should be good for testing since they don't have any GPOS tables.

I don't know how Qt implements this, but I once wrote a FontForge script that calculates the highest point in the glyph then puts an anchor point to a predefined distance above it. For ligatures I distributed the anchor points evenly according the number of components. May be a similar approach can be used by pango/harfbuzz.  
Comment 6 Behdad Esfahbod 2009-01-27 17:35:20 UTC
(In reply to comment #5)
> I missed this! sorry.
> 
> Farsiweb fonts like Titr and Nazli should be good for testing since they don't
> have any GPOS tables.
> 
> I don't know how Qt implements this, but I once wrote a FontForge script that
> calculates the highest point in the glyph then puts an anchor point to a
> predefined distance above it. For ligatures I distributed the anchor points
> evenly according the number of components. May be a similar approach can be
> used by pango/harfbuzz.  

Yes, that's the idea.  Also makes me wonder whether we should simply run that script on the fonts and be done...
Comment 7 Khaled Hosny 2009-01-27 18:02:15 UTC
(In reply to comment #6)
> Yes, that's the idea.  Also makes me wonder whether we should simply run that
> script on the fonts and be done...
> 

That won't work for non-free fonts, unfortunately there are plenty of them.
Comment 8 Behdad Esfahbod 2012-08-18 17:53:16 UTC
Merged HarfBuzz already, which does this.