Now that harfbuzz supports Indic shaping, we should consider using it for all text on Linux, in preference to the old pango codepath. According to Behdad, new harfbuzz is now as good as or better than old pango, and is shipping in stable GNOME. Once we shape all text through harfbuzz, we'll be able to rip out a bunch of old, crufty code that supports the pango backend, but we should leave it in place (just change the harfbuzz.scripts pref) for a cycle or two so that there's an easy way to revert behavior in case of any unexpected issues.
Created attachment 669137 [details] [diff] [review] use harfbuzz for all text shaping on Linux etc.
(Patch is based on top of bug 797402.) Tryserver run at https://tbpl.mozilla.org/?tree=Try&rev=6a8bf71053e2.
This patch _greatly_ improved Firefox's Khmer script display under linux. The old pango engine had false-positives and/or too willing to insert dotted-circles on broken clusters, inserting such glyph on script that would render ok on windows / osx. Yay.
Created attachment 669853 [details] comparison of Khmer script rendering pango vs harfbuzz-ng For the record, thought I'd attach a visual comparison of what was broken before switching to harfbuzz-ng indic rendering. Once again, thanks for the improvement. For Cambodia, this is certainly newsworthy :)
This patch removed the "(except when using AAT fonts)" comment (for Mac). The comment had just been added in bug 797402. Intentional?
Not really. I just pushed a followup to restore it: https://hg.mozilla.org/integration/mozilla-inbound/rev/35f68c5fae83 Thanks for noticing!
Hmm, Jonathan, I've spotted a pretty big rendering regression with Khmer script when using harfbuzz with a specific font set. A bug has been filed on freedesktop.org: https://bugs.freedesktop.org/show_bug.cgi?id=55827 Long story short, vowels are misplaced and erroneously duplicated. Should I file a bug over here too? This will definitively require synching with harfbuzz when it's fixed as it greatly hampers reading of khmer script.
(I'm assuming this also affects khmer script rendering on OSX)
Yes, please file a new bug for us to update harfbuzz again once that issue is fixed upstream. Thanks!
Jonathan, filed bug 799869.