-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Parent: #41
Goal
Implement @font-face support and custom web font loading so that pages can use fonts fetched from the network.
Prerequisites
- Steps 2-3 (render pipeline stable before adding font complexity)
Implementation
- Parse
@font-facerule:font-family,src(url + format hints),font-weight,font-style,font-display,unicode-range - Font loader: fetch WOFF2/WOFF/TTF via
ie-net - WOFF2 decompression using
woff2crate - Disk + memory font cache (avoid re-downloading)
- Register loaded fonts into
fontdb/cosmic-textso glyphon picks them up - Implement
font-displaybehavior state machine per@font-face:swap,block,fallback,optional - Trigger relayout when a font transitions from loading to loaded state
Tests
-
@font-faceparsing tests for all descriptors - WOFF2 decompression round-trip tests
- Font cache hit/miss tests
-
font-displaystate machine transition tests - Integration test: page with custom font loads, relayouts, renders correctly
Acceptance Criteria
-
@font-facerules parse correctly inie-css - WOFF2, WOFF, and TTF fonts load and decompress correctly
- Fonts are cached on disk and in memory
-
font-displaybehaviors match spec (swap, block, fallback, optional) - Layout updates when custom fonts finish loading
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels