googlefonts / googlefonts/fontations

dump a write table and get it back

Open
#235 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
826
Forks
75
Avg merge
22h 33m
Merged PRs (30d)
75

Description

If I build a simpleglyph in memory I have the write_fonts SimpleGlyph, if I recover it from u8's I end up with a `TableRef` and there is no apparent way to switch between the two.

This causes me problems because If emit-ir is on fontmake-rs writes things down and tries to recover them in subsequent runs if it doesn't think they have changed. In my WIP glyph compilation:

* I turn the IR glyph into a `SimpleGlyph`
* I use `write_fonts::dump_table` to write it down.
* In subsequent runs I need to get from a u8 stream back to the write type and there doesn't appear to be a way to do so.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at write_fonts::dump_table and the definitions of SimpleGlyph and TableRef to trace how the dumped bytes are represented on recovery. The issue is complete when a SimpleGlyph written to bytes can be recovered as the corresponding write type for subsequent fontmake-rs runs.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.