Closed Bug 1785254 Opened 2 years ago Closed 2 years ago

Update COLRv1 sweep gradient rendering to match the OpenType 1.9.1 spec

Categories

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

defect

Tracking

()

RESOLVED FIXED
105 Branch
Tracking Status
firefox105 --- fixed

People

(Reporter: jfkthame, Assigned: jfkthame)

References

Details

Attachments

(1 file)

The initial rendering implementation landed in bug 1740530 renders sweep (conic) gradients similarly to the current (OpenType 1.9-based) implementation in Blink.

However, the OpenType 1.9.1 spec (currently available in alpha review) modifies the specification of sweep gradients in a backward-incompatible way. Google is intending to update Chrome's behavior to match the revised spec at the same time as introducing variation support.

We should make the equivalent change before releasing COLRv1 support, so that all shipping implementations end up with interoperable behavior here.

(See https://skia-review.googlesource.com/c/skia/+/566416 for the update being made to Skia's rendering, as used by Chrome. The recent 4.35.0 release of FontTools was likewise updated for the new spec version: see https://github.com/fonttools/fonttools/pull/2743.)

We also improve the handling of ColorLine, including resolving to a
simple ColorPattern if there is only a single color stop.

The test font CAhem.ttf has also been rebuilt with latest FontTools,
to conform to the updated 1.9.1 spec for sweep gradient tables.

Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Pushed by jkew@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/dad5d7f9165a Revise Paint[Var]SweepGradient implementation to conform to OpenType 1.9.1 semantics. r=gfx-reviewers,lsalzman
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 105 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: