Intent to prototype & ship: Canvas2D 'lang' attribute

49 views
Skip to first unread message

Jonathan Kew

unread,
Mar 24, 2026, 6:32:04 AM (3 days ago) Mar 24
to dev-pl...@mozilla.org
As of Firefox 151, I intend to implement and ship the 'lang' attribute for Canvas2D text.


Summary: In some cases, text rendering is dependent on the language of the content being displayed -- e.g. there may be language-specific glyph shapes or ligature rules. This feature adds a lang IDL attribute to CanvasTextDrawingStyles, to give developers control over the language used for text drawing and metrics in Canvas2D.

Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1943070

Specification: https://html.spec.whatwg.org/multipage/canvas.html#text-styles

Standards Body: WHATWG

Platform coverage: All

Preference: n/a

DevTools bug: n/a

Extensions bug: n/a

Use counter: n/a

Link to standards-positions discussion: https://github.com/mozilla/standards-positions/issues/1150

Other browsers:

    Blink: shipped (v136)
    WebKit: supportive (https://github.com/WebKit/standards-positions/issues/439)

web-platform-tests: https://wpt.fyi/results/html/canvas?label=master&label=experimental&aligned&q=html%2Fcanvas%20lang
Reply all
Reply to author
Forward
0 new messages