harfbuzz / harfruzz

Port of RustyBuzz to use Fontations
MIT License
36 stars 3 forks source link

Expedient plan for moving to read-fonts #13

Open dfrg opened 1 month ago

dfrg commented 1 month ago

The goal is to replace ttf-parser with small diffs that don't break tests. With that in mind, I'm using the following process:

  1. Replaces calls into ttf-parser with stubs that contain the simplest equivalent read-fonts code that preserves behavior. This code may not be architecturally ideal, might have performance issues and will probably be missing comments and tests.
  2. Audit the new code, likely moving the bulk of it to read-fonts. Make it commented, tested and fast.
  3. Implement architectural changes to match the patterns used in skrifa. Most specifically, let's support acceleration structures that aren't bound to the lifetime of font data.

The rationale for this approach is that it’ll be vastly simpler to do cleanup and architectural changes if we’re not dancing around ttf-parser (or worse, mixed ttf-parser/read-fonts) code.

ref comments in #8