Commit 3a06dd9
committed
feat(websem,textlayout): render <text> — the text rung
The Web family gains a real shaped-text producer, and <text> leaves the
refusal corpus for six Chromium-baked cells.
The document says, the oracle resolves:
- websem's <text> arm owns source semantics only — character data with
XML whitespace collapsing (measured: a tab, a newline, and a run of
spaces each collapse to one advance), x/y, text-anchor, and the
cascaded family and size. It shapes nothing.
- textlayout resolves the run once against a declared font environment
and returns the immutable artifact; glyph outlines lower to rframe's
existing path facts, so no font identity crosses the contract and the
frame stays honestly glyphless.
- the admitted numeric domain is enforced, not assumed: integer position,
font-size a multiple of 5, integer anchor-resolved start. Chromium
snaps everything else by a rasterizer-internal rule; this refuses by
name rather than codifying it.
Hermetic by default: a run whose family the host never declared refuses
by name — no tofu, no ambient face, no machine-local pixel. A generic
family (including the initial value) names no declared font and says so.
fixtures/web-first/text/ is the suite, on the animation/ precedent and
under the corpus-growth law: the fixture is the document, the font is
the environment, and the baker declares the pinned identity to Chromium
exactly as the host declares it to the engine — verified against its
digest before any capture. All six cells are byte-exact with no
tolerance admissible.
svg-text graduates; what remains refused holds its own rows
(svg-text-undeclared-font, svg-text-tspan). Two legacy expectations move
with the behavior: basic-shapes.svg's stylesheet declares text-anchor
and its labels ask for a generic family — both were silent drops before
this rung and are named holes after it.1 parent 5e07b1d commit 3a06dd9
31 files changed
Lines changed: 1297 additions & 15 deletions
File tree
- crates
- csscascade/tests
- n0_cli/src
- websem
- src
- tests
- docs/wg/consolidation
- fixtures/web-first
- text
- chromium
- unsupported
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | | - | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
125 | 128 | | |
126 | 129 | | |
127 | 130 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
435 | 435 | | |
436 | 436 | | |
437 | 437 | | |
438 | | - | |
439 | | - | |
440 | | - | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
441 | 443 | | |
442 | 444 | | |
443 | 445 | | |
444 | | - | |
| 446 | + | |
445 | 447 | | |
446 | 448 | | |
447 | 449 | | |
| |||
485 | 487 | | |
486 | 488 | | |
487 | 489 | | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
488 | 496 | | |
489 | 497 | | |
490 | 498 | | |
| |||
506 | 514 | | |
507 | 515 | | |
508 | 516 | | |
| 517 | + | |
509 | 518 | | |
510 | 519 | | |
511 | 520 | | |
| |||
521 | 530 | | |
522 | 531 | | |
523 | 532 | | |
524 | | - | |
525 | | - | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
526 | 542 | | |
527 | 543 | | |
528 | 544 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
19 | 23 | | |
20 | 24 | | |
21 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
0 commit comments