Files
rust_browser/tests/goldens/expected/019-text-wrapping.layout.txt
Zachary D. Rowitsch e74b16790d Add real font support with bundled Noto Sans and font property pipeline
Integrate ab_glyph-based font rendering with bundled Noto Sans fonts
(Regular, Bold, Italic, BoldItalic, Mono) to replace the fixed-width
text measurer in golden tests. Thread font-weight, font-style, and
font-family through the entire rendering pipeline: CSS parsing → style
computation → layout → display list → rasterizer.

Key changes:
- fonts crate: font database, shaper, and rasterizer with bundled fonts
- CSS: parse font-family (comma-separated lists), font-weight, font-style
- shared: FontWeight and FontStyle types
- style: font property inheritance and computation
- layout: ProportionalTextMeasurer using real font metrics
- display_list: font properties on Text items (conditional dump output)
- render: font-aware text drawing
- Golden tests regenerated with proportional font measurements
- New golden tests (137-141) for font weight, style, family, and headings
- Golden test regeneration infrastructure (regen_goldens.rs)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 00:56:41 -05:00

46 lines
2.4 KiB
Plaintext

LayoutBox node=#1 tag=html box=block
content: (0, 0, 800, 150.4)
padding: 0 0 0 0
border: 0 0 0 0
margin: 0 0 0 0
LayoutBox node=#2 tag=body box=block
content: (8, 8, 784, 134.4)
padding: 0 0 0 0
border: 0 0 0 0
margin: 8 8 8 8
LayoutBox node=#3 tag=div box=block
content: (8, 8, 100, 134.4)
padding: 0 0 0 0
border: 0 0 0 0
margin: 0 0 0 0
inline_context: 7 lines, height=134.4, max_width=85.92069
line[0]: rect=(8, 8, 74.537445, 19.2) fragments=4
frag[0]: rect=(8, 8, 22.449337, 16) text="This" start=false end=false
frag[1]: rect=(33.50367, 8, 8.657856, 16) text="is" start=false end=false
frag[2]: rect=(45.21586, 8, 6.590308, 16) text="a" start=false end=false
frag[3]: rect=(54.8605, 8, 24.622616, 16) text="long" start=false end=false
line[1]: rect=(8, 27.2, 78.343605, 19.2) fragments=2
frag[0]: rect=(8, 27.2, 49.903084, 16) text="sentence" start=false end=false
frag[1]: rect=(60.957417, 27.2, 22.331863, 16) text="that" start=false end=false
line[2]: rect=(8, 46.4, 85.92069, 19.2) fragments=3
frag[0]: rect=(8, 46.4, 37.509544, 16) text="should" start=false end=false
frag[1]: rect=(48.563877, 46.4, 27.900146, 16) text="wrap" start=false end=false
frag[2]: rect=(79.51835, 46.4, 11.348018, 16) text="to" start=false end=false
line[3]: rect=(8, 65.600006, 77.11013, 19.2) fragments=2
frag[0]: rect=(8, 65.600006, 45.427315, 16) text="multiple" start=false end=false
frag[1]: rect=(56.481647, 65.600006, 25.574158, 16) text="lines" start=false end=false
line[4]: rect=(8, 84.8, 69.82672, 19.2) fragments=2
frag[0]: rect=(8, 84.8, 45.591774, 16) text="because" start=false end=false
frag[1]: rect=(56.646107, 84.8, 18.126286, 16) text="the" start=false end=false
line[5]: rect=(8, 104, 67.37151, 19.2) fragments=2
frag[0]: rect=(8, 104, 52.604992, 16) text="container" start=false end=false
frag[1]: rect=(63.659325, 104, 8.657856, 16) text="is" start=false end=false
line[6]: rect=(8, 123.2, 43.042583, 19.2) fragments=1
frag[0]: rect=(8, 123.2, 43.042583, 16) text="narrow." start=false end=false
LayoutBox node=#4 tag=anonymous box=anon
content: (0, 0, 496.15256, 16)
padding: 0 0 0 0
border: 0 0 0 0
margin: 0 0 0 0
text: "This is a long sente..."