Intent to Extend Experiment: Enhanced Canvas TextMetrics

40 views
Skip to first unread message

Florin Malita

unread,
May 18, 2026, 4:12:12 PM (yesterday) May 18
to blink-dev, Yashaswini Kumar, Mouad Debbar, Kevin Moore, Thomas Nattestad, Heather Miller, Stephen Chenney, Yegor Jbanov
Contact emails
jlav...@google.comandres...@chromium.orgfma...@chromium.orgsche...@chromium.org

Explainer
https://github.com/fserb/canvas2D/blob/master/spec/enhanced-textmetrics.md
https://github.com/Igalia/explainers/blob/main/canvas-formatted-text/text-metrics-additions.md
https://github.com/whatwg/html/issues/10677

Specification
https://github.com/whatwg/html/pull/11000

Summary
Expand the TextMetrics Canvas API to support selection rectangles, bounding box queries, and glyph cluster-based operations. This new functionality should enable complex text editing applications with accurate selection, caret positioning, and hit testing. Additionally, cluster-based rendering facilitates sophisticated text effects such as independent character animations and styling.

Blink component
Blink>Canvas

Web Feature ID
No information provided

TAG review
https://github.com/w3ctag/design-reviews/issues/1095

TAG review status
Pending

Origin Trial Name
Enhanced Canvas TextMetrics

Goals for experimentation
Partners have implemented prototypes based on the available runtime feature, with positive feedback. They are now interested in expanding the scope, and testing the API with real users. This experiment will provide valuable validation in real-world use scenarios, and should help us gauge the proposed API's fitness, ergonomics, and performance.

Chromium Trial Name
ExtendedTextMetrics

Origin Trial documentation link
https://github.com/Igalia/explainers/blob/main/canvas-formatted-text/text-metrics-additions.md

WebFeature UseCounter name
kExtendedTextMetrics

Risks


Interoperability and Compatibility
These are new features and we will get vendor agreement at WHATWG before shipping. So minimal interop risks beyond platform-specific metrics differences.

Gecko: No signal (https://github.com/mozilla/standards-positions/issues/1144)

WebKit: No signal (https://github.com/WebKit/standards-positions/issues/436)

Web developers: Positive Developers want the ability to animated glyphs independendly (such as exploding sentences) and the ability to do e.g. selection on canvas text. The proposed APIs support these use cases and more.

Other signals:

Ergonomics
None.

Activation
None.

Security
There is always a fingerprinting concern with HTML canvas. THe new features expose no novel fingerprinting surface (text metrics are already a fingerprinting concern).

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?

No information provided


Reason this experiment is being extended
Flutter Web has provided positive initial feedback based on internal testing. To validate the feature at scale, they require additional time to expose it to external developers via their own experimentation infrastructure.

The goal of this extension is to gather telemetry and feedback from real-world applications, allowing us to identify and address any remaining rough edges before proceeding with a formal launch.


Ongoing technical constraints
No information provided

Debuggability
DevTools supports querying the APIs by default.

Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, ChromeOS, Android, and Android WebView)?
Yes

Is this feature fully tested by web-platform-tests?
Yes
html/canvas/[element|offscreen]/text... 2d.text.measure.index-from-offset* 2d.text.measure.selection-rects* 2d.text.measure.text-clusters* https://wpt.fyi/results/html/canvas/element/text?label=master&label=experimental&aligned&q=tentative https://wpt.fyi/results/html/canvas/offscreen/text?label=master&label=experimental&aligned&q=tentative

Flag name on about://flags
Experimental Web Platform Features

Finch feature name
ExtendedTextMetrics

Requires code in //chrome?
False

Tracking bug
https://issues.chromium.org/issues/341213359

Measurement
UMA counters will be added for the new APIs.

Estimated milestones
Origin trial desktop first144
Origin trial desktop last149
Origin trial extension 1 end milestone155
DevTrial on desktop141
Origin trial Android first144
Origin trial Android last149
DevTrial on Android141


Link to entry on the Chrome Platform Status
https://chromestatus.com/feature/5075532483657728?gate=5178855770947584

Links to previous Intent discussions
Intent to Prototype: https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CADgYMVdqo4PBs4OkGqVncRizs8vtX4YtFLDcK%2BRxdYo_wnaRJQ%40mail.gmail.com
Ready for Trial: https://groups.google.com/a/chromium.org/g/blink-dev/c/OLCCI0ExvIk
Intent to Experiment: https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CADgYMVfC-Naw8pFVaUUPMSfW-u3kC7SMdDeHJgwU5YmSHOOeeA%40mail.gmail.com


This intent message was generated by Chrome Platform Status.

Mike Taylor

unread,
May 18, 2026, 5:55:33 PM (yesterday) May 18
to Florin Malita, blink-dev, Yashaswini Kumar, Mouad Debbar, Kevin Moore, Thomas Nattestad, Heather Miller, Stephen Chenney, Yegor Jbanov

On 5/18/26 4:11 p.m., Florin Malita wrote:

Contact emails
jlav...@google.comandres...@chromium.orgfma...@chromium.orgsche...@chromium.org

Explainer
https://github.com/fserb/canvas2D/blob/master/spec/enhanced-textmetrics.md
https://github.com/Igalia/explainers/blob/main/canvas-formatted-text/text-metrics-additions.md
https://github.com/whatwg/html/issues/10677

Specification
https://github.com/whatwg/html/pull/11000

Summary
Expand the TextMetrics Canvas API to support selection rectangles, bounding box queries, and glyph cluster-based operations. This new functionality should enable complex text editing applications with accurate selection, caret positioning, and hit testing. Additionally, cluster-based rendering facilitates sophisticated text effects such as independent character animations and styling.

Blink component
Blink>Canvas

Web Feature ID
No information provided

TAG review
https://github.com/w3ctag/design-reviews/issues/1095

TAG review status
Pending

Origin Trial Name
Enhanced Canvas TextMetrics

Goals for experimentation
Partners have implemented prototypes based on the available runtime feature, with positive feedback. They are now interested in expanding the scope, and testing the API with real users. This experiment will provide valuable validation in real-world use scenarios, and should help us gauge the proposed API's fitness, ergonomics, and performance.

Can you also comment on progress in the following areas?

Draft spec (early draft is ok, but must be spec-like and associated with the appropriate standardization venue, or WICG)
TAG review (see exceptions)
signals requests
Outreach for feedback from the spec community
WPT tests

I see there are some tests that pass in all browsers - that suggests the test isn't working as intended?

e.g., https://wpt.fyi/results/html/canvas/offscreen/text/2d.text.measure.strokeTextCluster-font-change.tentative.html?label=master&label=experimental&aligned&q=tentative

--
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+...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CADgYMVfjd5mbDkm16_Xf4fxfnrEeiAXLhjiBCXWik0GaNJGE2Q%40mail.gmail.com.

Vladimir Levin

unread,
10:48 AM (12 hours ago) 10:48 AM
to Mike Taylor, Florin Malita, blink-dev, Yashaswini Kumar, Mouad Debbar, Kevin Moore, Thomas Nattestad, Heather Miller, Stephen Chenney, Yegor Jbanov
Just to add to Mike's question here, the last activity on this HTML PR https://github.com/whatwg/html/pull/11000 seems to be from roughly a year ago. Is this still under active discussion? (Similar activity on https://github.com/whatwg/html/issues/10677)

Thanks,
Vlad 

Florin Malita

unread,
3:20 PM (7 hours ago) 3:20 PM
to Vladimir Levin, Mike Taylor, blink-dev, Yashaswini Kumar, Mouad Debbar, Kevin Moore, Thomas Nattestad, Heather Miller, Stephen Chenney, Yegor Jbanov
Thanks Vlad and Mike!

Replies inline.

The spec PR needs a couple of minor updates based on TAG feedback.

Beyond that, it is pending review and agreement on https://github.com/whatwg/html/issues/10677.  The main friction point is the proposal to significantly increase scope by exposing intermediate text shaping stages and related info.  We maintain that this is non-critical for current use cases and can be deferred.  schenney@ is engaging with Apple engineers to reach a resolution.
 

TAG review (see exceptions)

 
The TAG review offered some great feedback.  One major focus was accessibility, where the group’s position is to encourage more accessible alternatives instead of expanding canvas APIs (which are generally lacking).  We discussed several alternatives, but unfortunately none of them fulfill the low-level requirements we set to solve with TextClusters.  The upcoming HTML-in-Canvas should address some of the general Canvas accessibility issues, and is a good complement to Enhanced TextMetrics (an incremental Canvas API extension focusing on low-level text rendering capabilities).

Tangentially, TAG and WHATWG feedback also led to the implementation of language and text writing mode support for Canvas, which is tracked through separate intents.
 

signals requests

 
Apple engineers were involved in the initial discussions. schenney@ is reaching out to re-engage. 

Outreach for feedback from the spec community

 
Feedback has been collected primarily through the spec PR and associated discussions. Notably, Igalia/schenney@ have published blog posts and explainers to socialise the proposal:

https://blogs.igalia.com/schenney/canvas-text-editing/
https://github.com/Igalia/explainers/blob/main/canvas-formatted-text/text-metrics-additions.md
 

WPT tests

 
WPT tests have been merged upstream as 'tentative' pending the finalization of the spec: https://wpt.fyi/results/html/canvas/offscreen/text?label=master&label=experimental&aligned&q=tentative
Thanks, agreed, that's unexpected.  I filed a bug to investigate.
 
Reply all
Reply to author
Forward
0 new messages