googlefonts / googlefonts/fontations

Revisit record parsing hacks in codegen

Open
#659 8 comments 0 reactions 0 assignees View on GitHub
codegen
Dominant language
Rust
Stars
826
Forks
75
Avg merge
22h 33m
Merged PRs (30d)
75

Description

We have longstanding hacks for `ValueRecord` in codegen and some additional ones have been added for `SbitLineMetrics` (along with use of size one arrays for embedding `BigGlyphMetrics`). Are there ways to better handle these types?

* traversal: https://github.com/googlefonts/fontations/pull/637#discussion_r1351079062
* embedded record: https://github.com/googlefonts/fontations/pull/637#discussion_r1351085175
* derive `Copy` for `SbitLineMetrics`: https://github.com/googlefonts/fontations/pull/637#discussion_r1351090444
* Should we just derive `Copy` for all records?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing the codegen handling for ValueRecord, SbitLineMetrics, and the size-one-array embedding of BigGlyphMetrics. Read the linked discussions in pull request 637, including the traversal, embedded-record, and Copy-derivation threads. Done means the project has an agreed, less hacky approach for these record types.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.