googlefonts / googlefonts/fontations
fail gracefully when VarIndex in COLRv1 is out of range
- Dominant language
- Rust
- Stars
- 826
- Forks
- 75
- Avg merge
- 22h 33m
- Merged PRs (30d)
- 75
Description
E.g. this variable CORLv1 font Foldit.subset.hb.ttf, as subsetted by hb-subset, contains no VarStore so all VarIndices are technically out of range.
[Foldit.subset.zip](https://github.com/googlefonts/fontations/files/10520120/Foldit.subset.zip)
When we will build an api to retrive COLR variations, we want to make sure we don't panic but return an Error so we don't get "Aw, Snap!"
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the issue with the attached Foldit.subset.hb.ttf font, which has COLRv1 VarIndices but no VarStore. Trace the COLRv1 VarIndex and VarStore lookup handling and verify that an out-of-range VarIndex returns an Error rather than panicking.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100