← v160/enhanced-canvas-textmetrics · conformance

critique · rev 1

v160/enhanced-canvas-textmetrics

Implementation-sufficient Chrome 160 reference for Enhanced Canvas TextMetrics (redesigned shapeText() / ShapedText / GlyphRun / fillGlyphRun(s) / strokeGlyphRun(s) API), sourced from Blink IDL/C++, WPT 2d.text.shape.* tests, WHATWG PR #11000, WebKit/explainers#137, BCD, and ChromeStatus 5075532483657728.

reviewed 2026-11-24 by gendn leaf-reference writer (self-review; independent integrator review pending)

rubric

dimensionscoreseverityevidence
factual-source-fidelity5/5infoVerified directly against Blink base_rendering_context_2d.idl/.cc, shaped_text.idl/.cc, glyph_run.idl/.cc, WPT 2d.text.shape.* tests, and ChromeStatus 5075532483657728. Correctly documents the pre-ship redesign from TextMetrics/TextCluster to shapeText()/ShapedText/GlyphRun/fillGlyphRun(s)/strokeGlyphRun(s), including exact IndexSizeError bounds differences.
milestone-mapping5/5infoFeature 5075532483657728 appears under 'Enabled by default' in /api/v0/features?milestone=160 with listing name 'Enhanced Canvas TextMetrics'; slug enhanced-canvas-textmetrics matches lib/chromestatus.ts; H1 matches listing name; declared ChromeStatus row present.
completeness5/5inforeference-contract.json inventories all 17 WebIDL members across 5 inventory items (shapeText, ShapedText runs/clusters, ShapedText geometry/hit-testing, GlyphRun, and fillGlyphRun/strokeGlyphRun batch methods) mapped across all 9 required dimensions.
explanation-quality5/5infoExplains UTF-16 code-unit indexing, snapshotted font/direction/align/baseline vs draw-time paint styles, visual-order run merging, empty-string and frame-less document edge cases, and the Origin Trial redesign history.
examples4/5minorTwo complete semantic <pre><code> examples covering selection highlights, tight ink bounds, pointer caret hit-testing, per-cluster animated rendering, and GlyphRun.textMetrics(). No Chrome Platform Showcase demo exists yet (HEAD 404 on 2026-11-24).
browser-compat-fallbacks5/5infoHonest Limited availability Baseline banner; discloses BCD lacks entries for ShapedText/GlyphRun; cites ChromeStatus 160, Mozilla standards-positions#1144, WebKit standards-positions#436, and WebKit/explainers#137.
links-validity5/5infoEvery visible source/citation label carries a direct <a href> with target='_blank' rel='noopener'; all Blink source, WPT, blink-dev Intent, and ChromeStatus links verified on 2026-11-24.
accessibility5/5infoSingle <main>, single <h1>, sequential h2/h3 headings, <nav class='local-nav'> jump links, captioned semantic tables with <th scope>, keyboard-focusable .table-wrap scroll regions with :focus-visible outline, and role='note' Baseline banner.
responsive-ux5/5infoVerified via npm run responsive -- --page v160/enhanced-canvas-textmetrics --screenshots (desktop:ok mobile:ok) and visual inspection of desktop and mobile screenshots; added <wbr> breakpoints inside OffscreenCanvasRenderingContext2D so narrow 360px lines wrap cleanly at word boundaries with 0px overflow.
showcase-demo-relationship4/5infoHEAD check on https://chrome-platform-showcase.paulkinlan-ea.deno.net/v160/enhanced-canvas-textmetrics/ returned 404 on 2026-11-24; no broken iframe or speculative showcase link emitted so manifest demo remains honestly null.

modern-web-guidance consulted

open questions

follow-up goals