Skip to content

Epic: SVG text rendering on the engine of record #69

Description

@softmarshmallow

This issue is the durable epic tracker for SVG text on the engine of record (websem → textlayout → glyph outlines → rframe → n0). It answers where the text arc stands. Detailed execution notes live in a gitignored local plan and are deliberately not linked here.

The governing records are the text-oracle method, the taken-low text join, the admitted CLI slice, the dedicated text fixture suite, and the Web checklist.

Current position — 2026-08-31

The foundation is complete:

  • text-0 — gate method: deterministic Ahem pixel gate, real-font geometry rung named, admitted numeric domain, hermetic font environment, and corpus-growth law (#68).
  • text-1a — Web text oracle v0: one printable-ASCII, horizontal LTR style run in one exact declared outline face; no fallback or synthesis (#70).
  • text-1b — SVG <text> proving slice: x, y, direct text-anchor, cascaded font-family/font-size, SVG whitespace collapse, outline lowering, stable refusals, and six byte-exact Chromium Ahem cells (#71).
  • text-1c — host font environment: repeatable --font FAMILY=PATH@sha256:HEX, with the exact bytes verified before a frame exists (#72).
  • text-2 — consolidation decision: shaped text joins low. Each engine keeps its private artifact, registry, and glyph replay policy; no font or glyph resource enters rframe (#73).

The project currently has 1,051 primitive Chromium cells plus 16 sampled frames, a separate six-cell text suite, and 197 named refusal rows. The existing text slice is real but narrow. The <text> row and the broad SVG/CSS font, text, baseline, writing-mode, spacing, decoration, <tspan>, <textPath>, and textLength rows remain open.

Basic font resolution is not the immediate blocker: a host can already provide exact font bytes and the Web producer can shape one declared face. What is missing is browser-grade policy and evidence—family matching, fallback, real-font geometry grading, multiple runs, broader shaping, bidi, positioning, and advanced paint.

Epic ladder

  • T1 — safety fence (selected): audit every authored font-size basis before shaping (#82), then verify that the deterministic Ahem numeric domain is enforced after transforms, viewBox, and <use>, not only in local coordinates.
  • T2 — real-font geometry oracle: exercise the ratified rung B with one hash-pinned real outline face and one LTR run. Grade glyph geometry, advances, extents, anchor placement, and source mapping through Chromium measurement APIs. Make no Chromium pixel-fidelity claim.
  • T3 — single-run shaping breadth: add honestly graded glyph offsets, clusters, kerning/ligatures, combining marks, and selected non-ASCII repertoire, advancing the oracle version whenever geometry meaning changes.
  • T4 — <tspan> and multi-run text: one resolution across styled source ranges, inherited values, whitespace continuity, text chunks, and paint ownership. Do not reshape each child independently.
  • T5 — declared face selection and fallback: ordered family requests, exact face/style/variation selection, explicit generic mappings, and cluster-safe fallback over host-declared resources only. No ambient system fallback.
  • T6 — positioning and flow axes: measured splits for x/y/dx/dy/rotate lists, anchor chunks, spacing, baselines, bidi, direction, and writing mode.
  • T7 — text paint and decoration: glyph stroke, paint servers, context paint, opacity/effect ordering, and layout-owned decorations.
  • T8 — textLength / lengthAdjust: spacing or glyph scaling inside the one resolved artifact, never a post-layout width patch.
  • T9 — <textPath>: path-distance placement, startOffset, method/spacing, path metrics, transforms, references, and path animation.
  • T10 — dynamics and external resources: exact-time changes only after static meaning; external fonts and resources only through the shared future resource-I/O contract.

The order is dependency-first. A milestone may split into several PRs, and a safety/evidence PR may close zero checklist rows.

Selected next: T1

The first pass is #82. Probe presentation attributes, inline style, stylesheets, and inherited ancestors across exact px controls, viewport/container/font-metric units, em/rem, percentages, CSS math, var(), escapes, comments, CSS-wide values, shorthand interaction, and malformed fallback. Every candidate renders through Chromium and both n0 admissions with discriminating glyph metrics.

In the same checkpoint, measure the final-device numeric-domain promise under integer/fractional translation, scale, rotation/skew, root viewBox, nested transforms, and <use>. This is an audit, not a presumed defect.

Any silent divergence is repaired or converted to a stable text-specific refusal before T2 or <tspan> work begins. T1 is expected to improve safety, not tick the broad font-size or <text> rows.

Laws for every text rung

  • Exact font identity is an input; a family or file name alone is not identity.
  • No system-font discovery, silent fallback, tofu, ignored shaping, or guessed width.
  • Text resolves once. Geometry-sensitive consumers project from that result.
  • The Web text join remains low; reopening D-M is a registered owner decision, not an implementation convenience.
  • Ahem cells grade exact pixels. Real-font rung B grades geometry and makes no pixel claim. Thresholded raster remains parked with FLIP.
  • Unsupported behavior refuses by a stable name in strict and best-effort before nearby behavior ships.
  • Attribute and CSS property spellings remain separate checklist rows.
  • External I/O belongs to one host resource contract; text grows no private loader.
  • Every cell or geometry witness must discriminate the branch it claims, and gate sensitivity must be proved by deliberate perturbation.
  • No conformance score is produced or inspected; FLIP remains untouched.

Deliberate boundaries

The native n0 SkParagraph path and the Web SVG producer remain separate by the taken-low join. The Phase-5 production-oracle choice D-H is still open and is not pulled forward by this epic. HTML paragraph/page layout, editor text editing, external resource loading, and perceptual raster scoring are separate programs.

Every merged text PR updates this epic and posts the resulting consolidation position on #43.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions