On Tuesday, March 4, 2025 at 11:17:42 AM UTC-5 Chromestatus wrote:
Contact emails schen...@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 <https://issues.chromium.org/issues?q=customfield1222907:%22Blink%3ECanvas%22> TAG review None TAG review status Not applicable Is there a reason for no TAG review? I'm not sure if there's an exception that applies here. Risks Interoperability and Compatibility None *Gecko*: No signal (https://github.com/mozilla/standards-positions/issues/ 1150) Non official support in WHATWG meetings. *WebKit*: Support (https://github.com/WebKit/standards-positions/issues/439) *Web developers*: No signals Although this seems like a small feature, having no web developer signals is a bit unfortunate. Do you know of any cases where this behavior is currently broken and would be fixed by the change? *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? Pure addition of functionality. Debuggability None Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, ChromeOS, Android, and Android WebView)? Yes Feature is useful on all platforms and important for localization. Is this feature fully tested by web-platform-tests <https://chromium.googlesource.com/chromium/src/+/main/docs/testing/web_platform_tests.md> ? Yes https://wpt.fyi/results/html/canvas/element/manual/text?label=master&label= experimental canvas.2d.lang.dynamic.html canvas.2d.lang.empty.canvas.html canvas.2d.lang.inherit.canvas.html canvas.2d.lang.inherit.disconnected.canvas.html canvas.2d.lang.inherit.document.disconnected.canvas.html canvas.2d.lang.inherit.document.html canvas.2d.lang.html https://wpt.fyi/results/html/canvas/offscreen/manual/text? label=master&label=experimental canvas.2d.offscreen.lang.inherit.html canvas.2d.offscreen.lang.html canvas.2d.offscreen.transferred.lang.inherit.document.html canvas.2d.offscreen.transferred.lang.inherit.html canvas.2d.offscreen.transferred.lang.html canvas.2d.offscreen.worker.lang.inherit.html canvas.2d.offscreen.worker.lang.html https://wpt.fyi/results/html/canvas/element/text?label= master&label=experimental 2d.text.lang.default.html 2d.text.lang.valid.html https://wpt.fyi/results/html/canvas/offscreen/text?label= master&label=experimental 2d.text.lang.default.html 2d.text.lang.valid.html Flag name on about://flags Experimental Web Platform Features Finch feature name CanvasTextLang Non-finch justification This is a feature addition with very very little expected impact on performance or changes in existing website functionality. Requires code in //chrome? False Tracking bug https://issues.chromium.org/issues/385006131 Availability expectation WebKit implementation is moving forward. There is agreement that the feature is needed and implementation is not complex. I would anticipate all browsers have implemented within 2 years. Adoption expectation I would expect that the feature is adopted by default, in that the default value for the new attribute is likely to be by far the most common. So sites will immediately "adopt" the feature and get the benefits without taking any action. It wasn't immediately clear: what's the default value that would be used? Adoption plan The feature is publicized at https://blogs.igalia.com/ schenney/canvas-localization-support/ and will have an MDN page. Non-OSS dependencies Does the feature depend on any code or APIs outside the Chromium open source repository and its open-source dependencies to function? None. Sample links https://blogs.igalia.com/schenney/canvas-localization-support Estimated milestones Shipping on desktop 136 DevTrial on desktop 135 Shipping on Android 136 DevTrial on Android 135 Shipping on WebView 136 Anticipated spec changes Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way). None. Link to entry on the Chrome Platform Status https://chromestatus.com/ feature/5066778773028864?gate=5145440662847488 Links to previous Intent discussions Intent to Prototype: https://groups.google.com/a/chromium.org/g/blink-dev/c/WEjhPwI6lLc This intent message was generated by Chrome Platform Status <https://chromestatus.com>. -- You received this message because you are subscribed to the Google Groups "blink-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscr...@chromium.org. To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/99cbea22-7602-48f8-b255-c05a9c5372a7n%40chromium.org.