/fontmake-rs

Where in we pursue oxidizing (context: https://github.com/googlefonts/oxidize) fontmake.

Primary LanguageRustApache License 2.0Apache-2.0

fontmake-rs

Where in we pursue oxidizing (context: https://github.com/googlefonts/oxidize) fontmake.

Converts source to IR, and then IR to font binary. Aims to be safe, incremental, and fast.

References

  • Intermediate Representation (IR)
  • Editor perspective note from Just
  • Units
    • Fonts have all the best units; distinguishing between them turns out to matter.

Plan

As of 12/6/2022 we intend to:

  • Broadly, go depth first
  • Push glyphs & related tables through
  • Insert updated glyph building into fontmake (Python)
  • Wire up feature compilation using https://github.com/cmyr/fea-rs
  • Insert into fontmake
  • Then finish fontc and stop using fontmake :)

Fontmake will then have incremental, parallel, recompilation, delivering user benefit at a time when fontc doesn't yet do 100% of the job.

For context see https://github.com/googlefonts/oxidize/blob/main/text/2022-07-25-PROPOSAL-build-glyphs-in-rust.md and the discussion on googlefonts/oxidize#33.

Sources to play with

Google Fonts has lots, you could try https://github.com/rsheeter/google_fonts_sources to get some. Once you have them you could try building them:

cargo run --package fontc -- --source ../google_fonts_sources/sources/ofl/notosanskayahli/sources/NotoSansKayahLi.designspace

Contributing

We have included a few git hooks that you may choose to use to ensure that patches will pass CI; these are in resources/githooks.

To run the pre-push step manually:

$ ./resources/githooks/pre-push

If you would like to have these run automatically when you commit or push changes, you can set this as your git hooksPath:

$ git config core.hooksPath "resources/githooks"

Releasing

See https://github.com/googlefonts/fontations#releasing