Files
rust_browser/tests/goldens/expected/022-inline-background-border.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

47 lines
1.7 KiB
Plaintext

LayoutBox node=#1 tag=html box=block
content: (0, 0, 800, 35.2)
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, 19.2)
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, 784, 19.2)
padding: 0 0 0 0
border: 0 0 0 0
margin: 0 0 0 0
inline_context: 1 lines, height=19.2, max_width=161.21585
line[0]: rect=(8, 8, 161.21585, 19.2) fragments=6
frag[0]: rect=(8, 8, 23.612333, 16) text="Text" start=false end=false
frag[1]: rect=(40.666664, 8, 32.74009, 16) text="styled" start=true end=false
frag[2]: rect=(73.40675, 8, 3.0543318, 19.2) text=(none) start=false end=false
frag[3]: rect=(76.46108, 8, 26.70191, 16) text="span" start=false end=true
frag[4]: rect=(112.21732, 8, 29.568281, 16) text="more" start=false end=false
frag[5]: rect=(144.83994, 8, 21.321585, 16) text="text" start=false end=false
LayoutBox node=#4 tag=anonymous box=anon
content: (0, 0, 29.720997, 16)
padding: 0 0 0 0
border: 0 0 0 0
margin: 0 0 0 0
text: " Text "
LayoutBox node=#5 tag=span box=inline
content: (0, 0, 0, 0)
padding: 4 4 4 4
border: 2 2 2 2
margin: 0 0 0 0
LayoutBox node=#6 tag=anonymous box=anon
content: (0, 0, 62.49633, 16)
padding: 0 0 0 0
border: 0 0 0 0
margin: 0 0 0 0
text: "styled span"
LayoutBox node=#7 tag=anonymous box=anon
content: (0, 0, 60.05286, 16)
padding: 0 0 0 0
border: 0 0 0 0
margin: 0 0 0 0
text: " more text "