)]}'
{"id": 5075532483657728, "name": "Enhanced Canvas TextMetrics", "summary": "Expand the Canvas 2D text API to support text shaping inspection, selection rectangles, bounding box queries, and glyph run/cluster rendering.\n\nThis 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. ", "markdown_fields": [], "blink_components": ["Blink>Canvas"], "star_count": 92, "search_tags": [], "created": {"by": "fmalita@chromium.org", "when": "2025-05-16 15:00:04.796008"}, "updated": {"by": "fmalita@chromium.org", "when": "2026-11-23 19:00:10.898166"}, "category": "Graphics", "category_int": 14, "feature_notes": null, "web_feature": "Missing feature", "is_official_web_feature": false, "webdx_usecounter_enum": "200", "enterprise_feature_categories": [], "enterprise_product_category": 0, "is_releasenotes_content_reviewed": false, "is_releasenotes_publish_ready": false, "stages": [{"id": 5186161043308544, "created": "2025-05-16 15:00:05.808306", "feature_id": 5075532483657728, "stage_type": 110, "display_name": null, "pm_emails": [], "tl_emails": [], "ux_emails": [], "te_emails": [], "intent_thread_url": null, "announcement_url": null, "experiment_goals": null, "experiment_risks": null, "origin_trial_id": null, "origin_trial_feedback_url": null, "ot_action_requested": false, "ot_approval_buganizer_component": null, "ot_approval_buganizer_custom_field_id": null, "ot_approval_criteria_url": null, "ot_approval_group_email": null, "ot_chromium_trial_name": null, "ot_description": null, "ot_display_name": null, "ot_documentation_url": null, "ot_emails": [], "ot_feedback_submission_url": null, "ot_has_third_party_support": false, "ot_is_critical_trial": false, "ot_is_deprecation_trial": false, "ot_owner_email": null, "ot_requester_email": null, "ot_require_approvals": false, "ot_use_counter_bucket_number": null, "ot_webfeature_use_counter": null, "extensions": [], "experiment_extension_reason": null, "ot_stage_id": null, "finch_url": null, "rollout_milestone": null, "rollout_platforms": [], "rollout_details": null, "rollout_impact": 2, "rollout_stage_plan": null, "enterprise_policies": [], "desktop_first": null, "android_first": null, "ios_first": null, "webview_first": null, "desktop_last": null, "android_last": null, "ios_last": null, "webview_last": null}, {"id": 5153529089753088, "created": "2025-05-16 15:00:05.872464", "feature_id": 5075532483657728, "stage_type": 120, "display_name": null, "pm_emails": [], "tl_emails": [], "ux_emails": [], "te_emails": [], "intent_thread_url": "https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CADgYMVdqo4PBs4OkGqVncRizs8vtX4YtFLDcK%2BRxdYo_wnaRJQ%40mail.gmail.com", "announcement_url": null, "experiment_goals": null, "experiment_risks": null, "origin_trial_id": null, "origin_trial_feedback_url": null, "ot_action_requested": false, "ot_approval_buganizer_component": null, "ot_approval_buganizer_custom_field_id": null, "ot_approval_criteria_url": null, "ot_approval_group_email": null, "ot_chromium_trial_name": null, "ot_description": null, "ot_display_name": null, "ot_documentation_url": null, "ot_emails": [], "ot_feedback_submission_url": null, "ot_has_third_party_support": false, "ot_is_critical_trial": false, "ot_is_deprecation_trial": false, "ot_owner_email": null, "ot_requester_email": null, "ot_require_approvals": false, "ot_use_counter_bucket_number": null, "ot_webfeature_use_counter": null, "extensions": [], "experiment_extension_reason": null, "ot_stage_id": null, "finch_url": null, "rollout_milestone": null, "rollout_platforms": [], "rollout_details": null, "rollout_impact": 2, "rollout_stage_plan": null, "enterprise_policies": [], "desktop_first": null, "android_first": null, "ios_first": null, "webview_first": null, "desktop_last": null, "android_last": null, "ios_last": null, "webview_last": null}, {"id": 6279908606869504, "created": "2025-05-16 15:00:06.047721", "feature_id": 5075532483657728, "stage_type": 130, "display_name": null, "pm_emails": [], "tl_emails": [], "ux_emails": [], "te_emails": [], "intent_thread_url": null, "announcement_url": "https://groups.google.com/a/chromium.org/g/blink-dev/c/OLCCI0ExvIk", "experiment_goals": null, "experiment_risks": null, "origin_trial_id": null, "origin_trial_feedback_url": null, "ot_action_requested": false, "ot_approval_buganizer_component": null, "ot_approval_buganizer_custom_field_id": null, "ot_approval_criteria_url": null, "ot_approval_group_email": null, "ot_chromium_trial_name": null, "ot_description": null, "ot_display_name": null, "ot_documentation_url": null, "ot_emails": [], "ot_feedback_submission_url": null, "ot_has_third_party_support": false, "ot_is_critical_trial": false, "ot_is_deprecation_trial": false, "ot_owner_email": null, "ot_requester_email": null, "ot_require_approvals": false, "ot_use_counter_bucket_number": null, "ot_webfeature_use_counter": null, "extensions": [], "experiment_extension_reason": null, "ot_stage_id": null, "finch_url": null, "rollout_milestone": null, "rollout_platforms": [], "rollout_details": null, "rollout_impact": 2, "rollout_stage_plan": null, "enterprise_policies": [], "desktop_first": 141, "android_first": 141, "ios_first": null, "webview_first": null, "desktop_last": null, "android_last": null, "ios_last": null, "webview_last": null}, {"id": 5080492684345344, "created": "2025-05-16 15:00:06.111033", "feature_id": 5075532483657728, "stage_type": 140, "display_name": null, "pm_emails": [], "tl_emails": [], "ux_emails": [], "te_emails": [], "intent_thread_url": null, "announcement_url": null, "experiment_goals": null, "experiment_risks": null, "origin_trial_id": null, "origin_trial_feedback_url": null, "ot_action_requested": false, "ot_approval_buganizer_component": null, "ot_approval_buganizer_custom_field_id": null, "ot_approval_criteria_url": null, "ot_approval_group_email": null, "ot_chromium_trial_name": null, "ot_description": null, "ot_display_name": null, "ot_documentation_url": null, "ot_emails": [], "ot_feedback_submission_url": null, "ot_has_third_party_support": false, "ot_is_critical_trial": false, "ot_is_deprecation_trial": false, "ot_owner_email": null, "ot_requester_email": null, "ot_require_approvals": false, "ot_use_counter_bucket_number": null, "ot_webfeature_use_counter": null, "extensions": [], "experiment_extension_reason": null, "ot_stage_id": null, "finch_url": null, "rollout_milestone": null, "rollout_platforms": [], "rollout_details": null, "rollout_impact": 2, "rollout_stage_plan": null, "enterprise_policies": [], "desktop_first": null, "android_first": null, "ios_first": null, "webview_first": null, "desktop_last": null, "android_last": null, "ios_last": null, "webview_last": null}, {"id": 5114288842473472, "created": "2025-05-16 15:00:06.173476", "feature_id": 5075532483657728, "stage_type": 150, "display_name": "Enhanced Canvas TextMetrics", "pm_emails": [], "tl_emails": [], "ux_emails": [], "te_emails": [], "intent_thread_url": "https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CADgYMVfC-Naw8pFVaUUPMSfW-u3kC7SMdDeHJgwU5YmSHOOeeA%40mail.gmail.com", "announcement_url": null, "experiment_goals": "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.\n\nThis experiment will provide valuable validation in real-world use scenarios, and should help us gauge the proposed API's fitness, ergonomics, and performance.", "experiment_risks": null, "origin_trial_id": "1646628613757337601", "origin_trial_feedback_url": null, "ot_action_requested": false, "ot_approval_buganizer_component": null, "ot_approval_buganizer_custom_field_id": null, "ot_approval_criteria_url": null, "ot_approval_group_email": null, "ot_chromium_trial_name": "ExtendedTextMetrics", "ot_description": "Expand the TextMetrics Canvas API to support selection rectangles, bounding box queries, and glyph cluster-based operations.\n\nThis 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.", "ot_display_name": "Enhanced Canvas TextMetrics", "ot_documentation_url": "https://github.com/Igalia/explainers/blob/main/canvas-formatted-text/text-metrics-additions.md", "ot_emails": ["schenney@chromium.org", "fmalita@chromium.org"], "ot_feedback_submission_url": "https://github.com/Igalia/explainers/issues", "ot_has_third_party_support": true, "ot_is_critical_trial": false, "ot_is_deprecation_trial": false, "ot_owner_email": "fmalita@google.com", "ot_requester_email": null, "ot_require_approvals": false, "ot_use_counter_bucket_number": 5729, "ot_webfeature_use_counter": "kExtendedTextMetrics", "extensions": [{"id": 5199797209399296, "created": "2026-05-18 17:50:53.498564", "feature_id": 5075532483657728, "stage_type": 151, "display_name": null, "pm_emails": [], "tl_emails": [], "ux_emails": [], "te_emails": [], "intent_thread_url": "https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CADgYMVfjd5mbDkm16_Xf4fxfnrEeiAXLhjiBCXWik0GaNJGE2Q%40mail.gmail.com", "announcement_url": null, "experiment_goals": null, "experiment_risks": null, "origin_trial_id": null, "origin_trial_feedback_url": null, "ot_action_requested": false, "ot_approval_buganizer_component": null, "ot_approval_buganizer_custom_field_id": null, "ot_approval_criteria_url": null, "ot_approval_group_email": null, "ot_chromium_trial_name": null, "ot_description": null, "ot_display_name": null, "ot_documentation_url": null, "ot_emails": [], "ot_feedback_submission_url": null, "ot_has_third_party_support": false, "ot_is_critical_trial": false, "ot_is_deprecation_trial": false, "ot_owner_email": "fmalita@chromium.org", "ot_requester_email": "fmalita@chromium.org", "ot_require_approvals": false, "ot_use_counter_bucket_number": null, "ot_webfeature_use_counter": null, "extensions": [], "experiment_extension_reason": "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.\n\nThe goal of this extension is to gather telemetry and feedback from real-world applications, allowing us to identify and address any remaining edge cases before proceeding with a formal launch.", "ot_stage_id": 5114288842473472, "finch_url": null, "rollout_milestone": null, "rollout_platforms": [], "rollout_details": null, "rollout_impact": 2, "rollout_stage_plan": null, "enterprise_policies": [], "desktop_first": null, "android_first": null, "ios_first": null, "webview_first": null, "desktop_last": 152, "android_last": null, "ios_last": null, "webview_last": null}], "experiment_extension_reason": null, "ot_stage_id": null, "finch_url": null, "rollout_milestone": null, "rollout_platforms": [], "rollout_details": null, "rollout_impact": 2, "rollout_stage_plan": 0, "enterprise_policies": [], "desktop_first": 144, "android_first": 144, "ios_first": null, "webview_first": null, "desktop_last": 149, "android_last": 149, "ios_last": null, "webview_last": null, "ot_setup_status": 6}, {"id": 5067919838674944, "created": "2025-05-16 15:00:06.547720", "feature_id": 5075532483657728, "stage_type": 160, "display_name": null, "pm_emails": [], "tl_emails": [], "ux_emails": [], "te_emails": [], "intent_thread_url": "https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CADgYMVey-50Dg1b%3D7A7tgx%2BB7G4fzam52Vzx-bXTbrcYxqwmhw%40mail.gmail.com", "announcement_url": null, "experiment_goals": null, "experiment_risks": null, "origin_trial_id": null, "origin_trial_feedback_url": null, "ot_action_requested": false, "ot_approval_buganizer_component": null, "ot_approval_buganizer_custom_field_id": null, "ot_approval_criteria_url": null, "ot_approval_group_email": null, "ot_chromium_trial_name": null, "ot_description": null, "ot_display_name": null, "ot_documentation_url": null, "ot_emails": [], "ot_feedback_submission_url": null, "ot_has_third_party_support": false, "ot_is_critical_trial": false, "ot_is_deprecation_trial": false, "ot_owner_email": null, "ot_requester_email": null, "ot_require_approvals": false, "ot_use_counter_bucket_number": null, "ot_webfeature_use_counter": null, "extensions": [], "experiment_extension_reason": null, "ot_stage_id": null, "finch_url": null, "rollout_milestone": null, "rollout_platforms": [], "rollout_details": null, "rollout_impact": 2, "rollout_stage_plan": null, "enterprise_policies": [], "desktop_first": 160, "android_first": 160, "ios_first": null, "webview_first": 160, "desktop_last": null, "android_last": null, "ios_last": null, "webview_last": null}], "accurate_as_of": "2026-09-21 12:42:21.526748", "creator_email": "fmalita@chromium.org", "updater_email": "fmalita@chromium.org", "owner_emails": ["jlavrova@google.com", "andresrperez@chromium.org", "fmalita@chromium.org", "schenney@chromium.org"], "editor_emails": ["sharaks@google.com"], "cc_emails": [], "spec_mentor_emails": [], "unlisted": false, "deleted": false, "editors": ["sharaks@google.com"], "cc_recipients": [], "spec_mentors": [], "creator": "fmalita@chromium.org", "feature_type": "New or changed feature", "feature_type_int": 0, "intent_stage": "None", "intent_stage_int": 0, "active_stage_id": 5067919838674944, "bug_url": "https://issues.chromium.org/issues/341213359", "launch_bug_url": null, "new_crbug_url": "https://bugs.chromium.org/p/chromium/issues/entry?components=Blink>Canvas&blocking=341213359&cc=jlavrova@google.com,andresrperez@chromium.org,fmalita@chromium.org,schenney@chromium.org", "screenshot_links": [], "first_enterprise_notification_milestone": null, "enterprise_impact": 1, "breaking_change": false, "confidential": false, "shipping_year": 2026, "flag_name": "Experimental Web Platform Features", "finch_name": "ExtendedTextMetrics", "non_finch_justification": null, "ongoing_constraints": null, "rollout_plan": 0, "rollout_plan_displayname": "Will ship enabled for all users", "motivation": "The existing TextMetrics API provides measurements for atomic text, but offers no facilities to break down that information to a more granular level.\n\nSophisticated text applications (editors in particular) require such granular information in order to support accurate selection, caret positioning and hit testing at a cluster level. Currently they are resorting to various inaccurate approximations to work around API limitations.\n\nAnother complex use case involves rendering fragments of pre-shaped text with different attributes - e.g. different colors or different transforms. This is of particular interest to animation frameworks which allow characters to be animated independently. Such functionality is not directly supported in existing APIs, and implementers must again resort to approximate workarounds.\n\nThis proposal introduces Canvas 2D text shaping functionality to address these API shortcomings and offer first-class support for the above use cases.", "devtrial_instructions": null, "activation_risks": "None.", "measurement": "Usage is tracked via the Blink UseCounter WebFeature::kExtendedTextMetrics (ID: 5729).", "availability_expectation": null, "adoption_expectation": null, "adoption_plan": null, "initial_public_proposal_url": "https://github.com/whatwg/html/pull/11000", "explainer_links": ["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"], "requires_embedder_support": false, "spec_link": "https://github.com/whatwg/html/pull/11000", "api_spec": true, "automation_spec": false, "interop_compat_risks": "Interoperability Risk\n\nThe primary interoperability risk is that other browser engines (Gecko and WebKit) have not yet shipped implementations of this specific API surface. However, following Origin Trial feedback and WebKit's CanvasTextShaping proposal (https://github.com/WebKit/explainers/pull/137), we revised the API prior to shipping to align with WebKit's core architecture: separating text shaping (`ctx.shapeText()`) from measurement (`ctx.measureText()`), unifying runs and minimal clusters under `GlyphRun` (with per-run metrics via `GlyphRun.textMetrics()`), and rendering via `fillGlyphRun(s)` / `strokeGlyphRun(s)`.\n\nRemaining risk is mitigated by several factors:\n\n* Strictly Additive & Feature Detectable: The feature leaves `TextMetrics` and existing Canvas 2D methods untouched, adding `shapeText()`, `fillGlyphRun(s)`, and `strokeGlyphRun(s)` on `CanvasRenderingContext2D` / `OffscreenCanvasRenderingContext2D` along with the `ShapedText` and `GlyphRun` interfaces. Developers can trivially feature-detect support (e.g., `'shapeText' in CanvasRenderingContext2D.prototype`) and maintain existing fallbacks on non-supporting browsers.\n\n* Standard String Semantics: All index and range inputs/outputs (`start`, `end`, `advanceToPosition()`, and `positionToAdvance()`) are explicitly specified as 0-based UTF-16 code units, aligning with ECMAScript string operations, DOM Range/Selection, and `Intl.Segmenter`.\n\n* Forward-Compatible Extensibility: Returning a `ShapedText` object from single-style `shapeText(DOMString)` provides a clean, non-breaking foundation for future multi-style extensions (such as a `shapeText(FormattedText)` overload) and `Intl.Segmenter` line-breaking additions.\n\n\nCompatibility Risk\n\nNone. The changes are entirely additive and introduce no breaking changes to existing Canvas 2D measurement or rendering behavior.", "all_platforms": true, "all_platforms_descr": null, "non_oss_deps": null, "anticipated_spec_changes": "Ongoing standardization discussions are tracked in WHATWG and WebKit's explainer repository:\n\nhttps://github.com/whatwg/html/pull/11000\nhttps://github.com/whatwg/html/issues/10677\nhttps://github.com/WebKit/explainers/pull/137\n\nPotential Future Evolution & Compatibility Assessment:\n\n* Alignment with WebKit's Shaping Model: Prior to shipping, the API was updated from extending `TextMetrics` to a dedicated `shapeText()` / `ShapedText` / `GlyphRun` design aligned with the overlapping core layer of WebKit's CanvasTextShaping proposal (`WebKit/explainers#137`).\n\n* Additive Multi-Style Extensions: Higher-level multi-style input abstractions (e.g., `FormattedText`) and `Intl.Segmenter` line-break segmentation are intentionally decoupled from this initial single-style release and can be layered on top (for example, via a `shapeText(FormattedText)` overload) as strictly additive extensions.\n\n\nConclusion on Compat Risk:\n\nHaving already reconciled the core shaping and glyph-run primitives with WebKit's design direction, we do not anticipate backward-incompatible changes to the shipped API surface.", "security_risks": "There is always a fingerprinting concern with HTML canvas. THe new features expose no novel fingerprinting surface (text metrics are already a fingerprinting concern).", "ergonomics_risks": "None.", "wpt": true, "wpt_descr": "html/canvas/[element|offscreen]/text/2d.text.shape.*\n- 2d.text.shape.actualBoundingBox*\n- 2d.text.shape.advance-to-position*\n- 2d.text.shape.position-to-advance*\n- 2d.text.shape.selection-rects*\n- 2d.text.shape.glyph-clusters*\n- 2d.text.shape.fillGlyphRun*\n- 2d.text.shape.strokeGlyphRun*\n\nhttps://wpt.fyi/results/html/canvas/element/text?label=master&label=experimental&aligned&q=2d.text.shape\nhttps://wpt.fyi/results/html/canvas/offscreen/text?label=master&label=experimental&aligned&q=2d.text.shape", "webview_risks": null, "devrel_emails": ["devrel-chromestatus-all@google.com"], "debuggability": "DevTools supports querying the APIs by default.", "doc_links": [], "sample_links": [], "prefixed": null, "tags": [], "tag_review": "https://github.com/w3ctag/design-reviews/issues/1095", "tag_review_status": "Issues open", "tag_review_status_int": 2, "security_review_status": "Pending", "security_review_status_int": 1, "privacy_review_status": "Pending", "privacy_review_status_int": 1, "security_continuity_id": null, "security_launch_issue_id": null, "updated_display": null, "resources": {"samples": [], "docs": []}, "comments": null, "ff_views": 5, "safari_views": 8, "web_dev_views": 2, "browsers": {"chrome": {"bug": "https://issues.chromium.org/issues/341213359", "blink_components": ["Blink>Canvas"], "devrel": ["devrel-chromestatus-all@google.com"], "owners": ["jlavrova@google.com", "andresrperez@chromium.org", "fmalita@chromium.org", "schenney@chromium.org"], "origintrial": false, "prefixed": null, "flag": false, "status": {"text": "Proposed", "val": 2, "milestone_str": "Proposed"}, "announced": false, "desktop": 160, "android": 160, "webview": 160, "ios": null}, "ff": {"view": {"url": "https://github.com/mozilla/standards-positions/issues/1144", "notes": null, "text": "No signal", "val": 5}}, "safari": {"view": {"url": "https://github.com/WebKit/standards-positions/issues/436", "notes": "WebKit supports the problem space\u2014enabling canvas text shaping, cluster rendering, and selection\u2014and objected to the earlier `TextMetrics`-based API design on WHATWG issue #10677, subsequently publishing an alternative `CanvasTextShaping` sketch (https://github.com/WebKit/explainers/pull/137).\n\nPrior to shipping, we redesigned this proposal around `shapeText()`, `ShapedText`, `GlyphRun`, and `fillGlyphRun(s)` / `strokeGlyphRun(s)` (leaving `TextMetrics` unchanged) to align with WebKit's core shaping architecture while deferring multi-style `FormattedText` and `Intl.Segmenter` extensions to a future phase.", "text": "Neutral", "val": 8}}, "webdev": {"view": {"text": "Positive", "val": 2, "url": null, "notes": "Strongly Positive\n\nThere is strong demand from canvas-heavy frameworks and applications that implement custom text layout and text editing. Canvas text rendering currently suffers from significant performance and memory overhead because applications are forced to synchronize offscreen DOM elements just to measure selection rectangles, bounding boxes, and caret positions.\n\nKey validation from the ~8-month Origin Trial:\n\n* Flutter Web: Integrated and validated the capability in their production engine (WebParagraph) throughout the Origin Trial, and migrated to the updated `shapeText()` / `ShapedText` / `GlyphRun` surface (`glyphClusters()`, `selectionRects()`, `actualBoundingBox()`, `fillGlyphRun()`). They rely on these primitives to drive their web text layout and hit-testing, and are strongly advocating for shipping this capability.\n\n* Canvas Tooling & Creative Coding: Successfully demonstrated in complex single-line typography scenarios, such as interactive text-on-a-path editors and per-glyph animations, without requiring DOM-based synchronization."}}, "other": {"view": {"text": null, "val": null, "url": null, "notes": null}}}, "standards": {"spec": "https://github.com/whatwg/html/pull/11000", "maturity": {"text": "Specification currently under development in a Working Group", "short_text": "Working draft", "val": 4}}, "is_released": false, "is_enterprise_feature": false, "experiment_timeline": null, "ai_test_eval_report": null, "ai_test_eval_run_status": null, "ai_test_eval_status_timestamp": null}