- Add font::embedded module with TrueType/OpenType CFF/Type1 support
- Wrap ttf-parser/owned_ttf_parser for glyph metrics and cmap lookups
- Implement Type1Metrics with limited capability (Widths/FontBBox only)
- Add EmptyFontMetrics for corrupt/missing fonts
- Expose unified FontMetrics trait: glyph_id_for, advance, bbox, units_per_em
- Handle font subset prefixes (return None for unmapped chars)
- Decode font stream filters (FlateDecode, etc.)
- Emit FONT_PARSE_FAILED and FONT_UNSUPPORTED diagnostics
- Add 14 comprehensive tests for all acceptance criteria
Acceptance criteria:
✓ TrueType font loaded; glyph_id_for('A') matches Face cmap
✓ OpenType CFF font supported (same code path as TrueType)
✓ Type1 font gracefully wraps without CharStrings parser
✓ Corrupt font returns EmptyFontMetrics; emits diagnostic
Co-Authored-By: Claude Code <noreply@anthropic.com>
1 line
41 B
Text
1 line
41 B
Text
30e02437ed27b17cba89afb74f72753939f44e37
|