Skip to content

Refactor RasterFont and Glyphs to be simpler #8

Description

@pushfoo

TL;DR: Separating glyphs and metadata into two tables may have over-complicated the design

When first written, @dataclass didn't play nice with Pillow image cores. Since this type is painful to use / annotate, it may be best to take another approach.

One possible solution is to redesign the class as follows:

class RasterFont(MutableMapping[str, Glyph]):
   # Rember to add getmask2, which returns a tuple + is expected by PIL's font renderer now?
  ...

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

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions