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>
15 lines
1.1 KiB
Plaintext
15 lines
1.1 KiB
Plaintext
DisplayList items=13
|
|
Text rect=(8, 8, 22.449337, 16) text="This" color=#000000 font_size=16
|
|
Text rect=(39.612335, 8, 19.477238, 16) text="has" color=#000000 font_size=16
|
|
Text rect=(68.25256, 8, 45.427315, 16) text="multiple" color=#000000 font_size=16
|
|
Text rect=(122.842865, 8, 37.333336, 16) text="spaces" color=#000000 font_size=16
|
|
Text rect=(8, 27.2, 21.07489, 16) text="and" color=#000000 font_size=16
|
|
Text rect=(8, 46.4, 48.693096, 16) text="newlines" color=#000000 font_size=16
|
|
Text rect=(8, 65.600006, 22.331863, 16) text="that" color=#000000 font_size=16
|
|
Text rect=(33.386196, 65.600006, 37.509544, 16) text="should" color=#000000 font_size=16
|
|
Text rect=(73.950066, 65.600006, 13.85022, 16) text="be" color=#000000 font_size=16
|
|
Text rect=(90.854614, 65.600006, 55.62408, 16) text="preserved" color=#000000 font_size=16
|
|
Text rect=(149.53304, 65.600006, 29.18062, 16) text="while" color=#000000 font_size=16
|
|
Text rect=(8, 84.8, 46.508076, 16) text="allowing" color=#000000 font_size=16
|
|
Text rect=(57.56241, 84.8, 52.640236, 16) text="wrapping" color=#000000 font_size=16
|