Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom types for the meta table #1244

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Custom types for the meta table #1244

wants to merge 4 commits into from

Commits on Nov 14, 2024

  1. Add initial implementation of meta table, with read and write

    This commit adds the code necessary to read and write the `meta` table,
    including its codegen definition, manual extras to handle the variable
    length data fields, and plumbing to surface it within `read-fonts` and
    `write-fonts`.
    
    Where possible, this commit borrows liberally from the implementation of
    other tables, especially `name` (for its handling of variable length
    data).
    
    This is an early implementation, and as such requires manual and
    automated testing. Additionally, there is an implementation of the
    FontWrite trait for &[u8] that may be redundant.
    Hoolean authored and cmyr committed Nov 14, 2024
    Configuration menu
    Copy the full SHA
    655a589 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1437cd9 View commit details
    Browse the repository at this point in the history
  3. Add basic custom types for the 'meta' table

    This adds types and the required impls that can represent the expected
    contents of the 'meta' table.
    
    This has to be handwritten, because the 'meta' table contains different
    payloads depending on the included tag for each record.
    
    I think having these as real types will provide a significantly better
    API though, and avoid us writing invalid data.
    
    The actual implementations for these types are very spartan; eventually
    I imagine having parsing & constructing code for the ScriptLangTag
    struct that ensures it conforms to the spec.
    cmyr committed Nov 14, 2024
    Configuration menu
    Copy the full SHA
    7113af2 View commit details
    Browse the repository at this point in the history

Commits on Nov 15, 2024

  1. Configuration menu
    Copy the full SHA
    814f481 View commit details
    Browse the repository at this point in the history