Implement the fontVariantCaps attribute for Canvas2D text
Categories
(Core :: Graphics: Canvas2D, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox117 | --- | fixed |
People
(Reporter: jfkthame, Assigned: jfkthame)
References
(Blocks 2 open bugs, Regressed 1 open bug)
Details
Attachments
(3 files)
Assignee | ||
Comment 1•3 years ago
|
||
As for fontKerning, the current Blink implementation (and associated WPT tests) seems wrong to me, in that it treats the keyword value strings as case-insensitive; see bug 1778908 comment 1.
Comment 2•3 years ago
|
||
Triage - since this is a defect, it needs severity, I am uncertain how this feature affects the appearance of text on a canvas2D, so I am marking this S4 as a possibly just cosmetic issue - is there an example in the wild?
Assignee | ||
Comment 3•3 years ago
|
||
Before we do this, I'm seeking clarification of a spec/interop issue -- see https://github.com/whatwg/html/issues/8103 and https://crbug.com/1343549. Basically, the question is how fontVariantCaps
should interact with the font
attribute, which may specify the small-caps
variant (but not other caps variants).
Assignee | ||
Comment 4•2 years ago
|
||
Bumping this to S3; it seems like a pretty normal-level feature, where lack of support could result in a site getting lowercase text where it wanted small-caps. Also, the Interop-2023 offscreen-canvas tests include a couple for fontVariantCaps, which we currently fail.
Assignee | ||
Comment 5•2 years ago
|
||
Surprisingly, this is sufficient to pass the existing WPT tests for fontVariantCaps.
(They only test setting and reading the attribute, but don't verify that it actually
has any effect on rendering!)
Rendering tests will be added in the next patch, along with hooking up the behavior.
Updated•2 years ago
|
Assignee | ||
Comment 6•2 years ago
|
||
The behavior in some of these cases is open to debate, as the spec is quite unclear;
see https://github.com/whatwg/html/issues/8103. What I've implemented here gives the
rendering result as Chrome for these tests, so hopefully we can get this clarified
in the spec as well.
Depends on D182566
Updated•2 years ago
|
Updated•2 years ago
|
Assignee | ||
Comment 7•2 years ago
|
||
Test the same features as the canvas-element reftests, for both a main-thread
OffscreenCanvas and in a worker.
Depends on D182567
Comment 10•2 years ago
|
||
Backed out for causing failures at fontVariantCaps
Backout link: https://hg.mozilla.org/integration/autoland/rev/ab08a64452cd0f4fb7efb0e275dec31e0d9fc1ff
Push where failures started: https://treeherder.mozilla.org/jobs?repo=autoland&resultStatus=testfailed%2Cbusted%2Cexception%2Cretry%2Cusercancel&searchStr=wr&revision=cf717d6692eb6ff08bb1d0342645c7c6c1dcf8f7&selectedTaskRun=HYGunfz2QJyFQVFRTQJGlg.0
Failure log: https://treeherder.mozilla.org/logviewer?job_id=421446106&repo=autoland&lineNumber=20673
Comment 12•2 years ago
|
||
Comment 13•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/c3b75097bc02
https://hg.mozilla.org/mozilla-central/rev/def0a0be81f9
https://hg.mozilla.org/mozilla-central/rev/892665cb2eb7
Assignee | ||
Updated•2 years ago
|
Description
•