If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

use harfbuzz for all text shaping on Linux

RESOLVED FIXED in mozilla19



Layout: Text
5 years ago
5 years ago


(Reporter: jfkthame, Assigned: jfkthame)


Dependency tree / graph
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)



(2 attachments)



5 years ago
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.

Comment 1

5 years ago
Created attachment 669137 [details] [diff] [review]
use harfbuzz for all text shaping on Linux etc.
Attachment #669137 - Flags: review?(jdaggett)

Comment 2

5 years ago
(Patch is based on top of bug 797402.) Tryserver run at https://tbpl.mozilla.org/?tree=Try&rev=6a8bf71053e2.


5 years ago
Attachment #669137 - Flags: review?(jdaggett) → review+

Comment 3

5 years ago
Assignee: nobody → jfkthame
Target Milestone: --- → mozilla19
Last Resolved: 5 years ago
Flags: in-testsuite-
Resolution: --- → FIXED

Comment 5

5 years ago
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.


Comment 6

5 years ago
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 :)

Comment 7

5 years ago
This patch removed the "(except when using AAT fonts)" comment (for Mac).  The comment had just been added in bug 797402.  Intentional?

Comment 8

5 years ago
Not really. I just pushed a followup to restore it:
Thanks for noticing!

Comment 9

5 years ago
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.

Comment 10

5 years ago
(I'm assuming this also affects khmer script rendering on OSX)

Comment 11

5 years ago
Yes, please file a new bug for us to update harfbuzz again once that issue is fixed upstream. Thanks!

Comment 12

5 years ago
Jonathan, filed bug 799869.
Depends on: 801410


5 years ago
Blocks: 810252
You need to log in before you can comment on or make changes to this bug.