Better kerning & groups tooling
- Dominant language
- Rust
- Stars
- 61
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Description
Working with kerning & groups in code has been a pain every time I've had to do it, and a lot of that comes from having relatively basic functionality not being available because both Python & Rust libraries; they just expose raw dictionary/map types and provide zero convenience methods. This has become somewhat of a pet peeve of mine and something I'd like to fix.
Some of my ideas are as follows, and I'd like to gauge interest/discuss them before starting work:
1. Kerning look-up methods (one with group resolution, one without)
2. Kerning/Group modifying methods that uphold invariants (as opposed to validation on write-to-disk)
3. Generating reverse look-ups for kerning & groups
4. Transparent caching of reverse look-ups to make resolving kerns faster (transparent as in, requires no thought/involvement from the library user at any point, will require interior mutability)
5. Renaming group method
6. Culling empty groups method
7. Culling 0 kerns method
The breaking change would be privatising `Font.kerning` and `Font.groups` and/or changing the underlying type. Interested in hearing any use cases for kerning/group information beyond what I've outlined in my points. Iterating over groups/kerning would of course still be available
Contributor guide
No contributing guide indexed for this repository
Research direction
Begin with the public Font.kerning and Font.groups APIs described in the issue, and review how the Rust and Python libraries currently expose raw maps. Before coding, narrow the proposed list to an agreed change; done means the selected lookup, mutation, reverse-lookup, caching, or cleanup behavior is specified and its compatibility impact is resolved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, rust
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100