Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Intent to Prototype: Language support for CanvasTextDrawingStyles

125 views
Skip to first unread message

Chromestatus

unread,
Dec 18, 2024, 8:31:09 PM12/18/24
to blin...@chromium.org, sche...@chromium.org

Contact emails

sche...@chromium.org

Explainer

https://github.com/whatwg/html/pull/10873

Specification

https://github.com/whatwg/html/pull/10873

Summary

The <canvas> DOM element, like all DOM elements, accepts a `lang` attribute that is used to define language specific treatment for font selection (when fonts have locale specific glyphs). Browsers respect this attribute. However, when an OffscreenCanvas is created there is no way to set locale information, possibly resulting in a state where an offscreen canvas produces rendered results that differ from the canvas in which it's output is used. This feature adds a `lang` IDL attribute to CanvasTextDrawingStyles to give developers direct control over the language for the text drawing and metrics.



Blink component

Blink>Canvas

Motivation

Provide a way to set the primary language for font resolution in OffscreenCanvas, so that offscreen and regular canvas content uses the same font information. This is blocking Canvas Text Metrics Additions because it was raised in the spec discussion.



Initial public proposal

https://github.com/whatwg/html/issues/10862

TAG review

None

TAG review status

Pending

Risks



Interoperability and Compatibility

None



Gecko: No signal

WebKit: No signal

Web developers: No signals

Other signals:

WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?

None



Debuggability

None



Is this feature fully tested by web-platform-tests?

No

Flag name on about://flags

None

Finch feature name

None

Non-finch justification

None

Requires code in //chrome?

False

Tracking bug

https://issues.chromium.org/issues/385006131

Estimated milestones

No milestones specified



Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5066778773028864?gate=5108115920650240

This intent message was generated by Chrome Platform Status.
Reply all
Reply to author
Forward
0 new messages