googlefonts / googlefonts/fontc

Make sure our inputs are healthy before computing deltas

Open
#241 0 comments 0 reactions 0 assignees View on GitHub
correctness
Dominant language
Rust
Stars
193
Forks
21
Avg merge
1d 17h
Merged PRs (30d)
65

Description

From @anthrotype on https://github.com/googlefonts/fontmake-rs/pull/236#discussion_r1159672218:

Before computing deltas, we want to check that the on/off-curve flags are identical for simple glyphs; for composites, the component glyph name and the 2x2 transform mast be the same (only x,y offset can vary).
Fonttools currently skips and issues a warning for incompatible glyphs, we might do the same.
https://github.com/fonttools/fonttools/blob/3b9a73ff8379ab49d3ce35aaaaf04b3a7d9d1655/Lib/fontTools/varLib/__init__.py#L276-L280

Also the number of contours and the list of end point indices for each contour. Basically what fontTools calls _GlyphControls here:
https://github.com/fonttools/fonttools/blob/3b9a73ff8379ab49d3ce35aaaaf04b3a7d9d1655/Lib/fontTools/ttLib/tables/_g_l_y_f.py#L375-L383

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading the linked fontTools _GlyphControls implementation and the varLib compatibility check referenced in the issue, then trace the corresponding delta computation in fontc. Done means incompatible simple or composite glyph inputs are detected before deltas are computed, with the specified controls compared and incompatible glyphs handled consistently.

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
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.