Commit graph

1 commit

Author SHA1 Message Date
jedarden
a20647a4a6 feat(pdftract-njde): implement font fingerprint cache (Level 3)
Implement Level 3 of the encoding fallback chain. Hash the raw decoded
font program bytes (/FontFile, /FontFile2, /FontFile3) with SHA-256
and look up the 32-byte digest in a compile-time phf::Map.

- build.rs: generate_font_fingerprints() reads JSON, builds phf::Map
- src/font/fingerprint.rs: FontFingerprint, CachedFingerprint, lookup API
- build/font-fingerprints.json: empty database (placeholder)

Acceptance criteria:
- Empty JSON produces valid phf::Map
- Hash is stable across runs
- Lookup of unknown digest returns None
- Binary footprint < 500KB for 200-font DB (empty = negligible)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-23 21:27:24 -04:00