GNOME Bugzilla – Bug 135753
Improve Arabic mark positioning
Last modified: 2012-08-18 17:53:16 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.
I'm going to close this as WONTFIX. If better mark positioning is desired, GPOS should be used.
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.
Created attachment 117958 [details] Qt 4 rendering Arabic text with Traditional Arabic font (no GPOS)
Nice. Where can I get that font to try? It isn't hard to do actually. I may give it a try.
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.
(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...
(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.
Merged HarfBuzz already, which does this.