Closed Bug 1509423 Opened 6 years ago Closed 5 years ago

Use harfbuzz for AAT layout instead of CoreText

Categories

(Core :: Layout: Text and Fonts, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla69
Tracking Status
firefox69 --- fixed

People

(Reporter: jrmuizel, Assigned: jfkthame)

References

(Blocks 2 open bugs)

Details

Attachments

(2 files, 3 obsolete files)

Now that harfbuzz supports AAT layout it seems like we should be able to drop support for shaping with CoreText.
Blocks: 1509158
In principle, yes, though we should plan to do a fair bit of testing before we make that jump; this is very new (and not very extensively tested yet) on the harfbuzz side, so I don't want to rush things here.
Chrome is switched https://chromium-review.googlesource.com/c/chromium/src/+/1275945
Is it possible to see which tests needs to be rebaselined after the switch on Firefox also? That may help HarfBuzz development also.
Priority: -- → P3
Depends on: 1500356
Here's a patch to make us use harfbuzz native AAT support rather than Core Text for shaping; let's see how it fares on try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=a1311b6661a30c824554d387b4b300d07322e320.
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Oops - the pref was set backwards in that patch, so the try push didn't really test anything... here goes, with the pref flipped so we'll really test the harfbuzz version. https://treeherder.mozilla.org/#/jobs?repo=try&revision=d983a399d6f17c2716ba49fce641cb41a43f5d48
Attachment #9033970 - Attachment is obsolete: true
The test failures on try look pretty insignificant, but OTOH I've noticed a number of cases where the harfbuzz AAT support doesn't match Core Text rendering. Filed some issues upstream:

  https://github.com/harfbuzz/harfbuzz/issues/1528
  https://github.com/harfbuzz/harfbuzz/issues/1529
  https://github.com/harfbuzz/harfbuzz/issues/1530
  https://github.com/harfbuzz/harfbuzz/issues/1531
  https://github.com/harfbuzz/harfbuzz/issues/1532

We should probably see what happens with these before moving forward here.
Try run after harfbuzz 2.3.1 (bug 1524102) landed. The test failures look insignificant (typically tiny subpixel antialiasing issues), but there are still some Indic rendering issues with a few Apple fonts; e.g. the first line of the main text at https://www.unicode.org/standard/translations/telugu.html has a cluster that shapes incorrectly.
Attachment #9033994 - Attachment is obsolete: true
Blocks: 1540143

I think we should go ahead and do this, once the mozilla-68 soft freeze period is past; it seems to be working OK for Chrome, AFAICT.

We can initially put the use of the old Core Text backend behind a pref, so that it's easy to revert to using it if we do see any issues, and then after it has baked for a couple of releases, we can pull out the old code altogether.

Attachment #9040768 - Attachment is obsolete: true

Depends on D31094

Pushed by jkew@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7bab77eee333
Disable the gfxCoreText backend and use native HarfBuzz shaping for AAT fonts. r=jrmuizel
https://hg.mozilla.org/integration/autoland/rev/6df30b02e311
Test/manifest updates to account for minor rendering differences between HarfBuzz and Core Text. r=jrmuizel
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/16919 for changes under testing/web-platform/tests
Upstream web-platform-tests status checks passed, PR will merge once commit reaches central.
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69
Upstream PR merged
Regressions: 1553889
Regressions: 1557846
No longer regressions: 1557846
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: