Skip to content

Better kerning & groups tooling #331

Description

@RickyDaMa

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions