Skip to content

Take the default master as authoritative in designspace kerning - #338

Merged
rsheeter merged 1 commit into
mainfrom
kern4
Jun 13, 2023
Merged

Take the default master as authoritative in designspace kerning#338
rsheeter merged 1 commit into
mainfrom
kern4

Conversation

@rsheeter

Copy link
Copy Markdown
Contributor

Based on discussion on googlefonts/ufo2ft#635, treat the group names in the default master as authorititive. Remap alternate names for the same {glyphs} in other masters. Ignore all groups from non-default masters that do not identify a set of glyphs given a name in the default.

@rsheeter
rsheeter requested a review from anthrotype June 13, 2023 03:34
@rsheeter rsheeter changed the title [WIP] Take the default master as authoritative in designspace kerning Take the default master as authoritative in designspace kerning Jun 13, 2023
@rsheeter
rsheeter marked this pull request as ready for review June 13, 2023 03:37
Comment thread ufo2fontir/src/source.rs Outdated
Comment thread ufo2fontir/src/source.rs Outdated
Comment thread ufo2fontir/src/source.rs Outdated
Comment thread ufo2fontir/src/source.rs Outdated
Comment thread ufo2fontir/src/source.rs Outdated
@rsheeter
rsheeter force-pushed the kern3 branch 2 times, most recently from f82607a to f18f183 Compare June 13, 2023 20:50
Base automatically changed from kern3 to main June 13, 2023 21:04
@rsheeter
rsheeter force-pushed the kern4 branch 3 times, most recently from 04732ef to b54af50 Compare June 13, 2023 21:32
@rsheeter
rsheeter merged commit 22b7e36 into main Jun 13, 2023
@rsheeter
rsheeter deleted the kern4 branch June 13, 2023 23:00
anthrotype added a commit that referenced this pull request Jul 14, 2026
#636 broke the kern group rename map: its loop compares the default
master's groups against themselves, so old_to_new_group_names only ever
holds identity entries and kerning referencing a non-default master's
own name for a group is dropped rather than renamed. No test noticed:
groups_renamed_to_match_master only pins that the merged map equals the
default's groups, which holds whether renaming works or not.

Assert all of the above, including the fixture premise #338 built the
WghtVar groups around (Bold's the_WrOng_name = the default's
correct_name members), so the tests cannot go vacuous if the fixture
changes.
anthrotype added a commit that referenced this pull request Jul 14, 2026
#636 broke the kern group rename map from #338. The kerning_groups_for
calls it deduplicated were never duplicates -- one loaded the default
master's groups, the loop loaded each non-default source's own -- so
reusing the first call's result left the loop comparing the default's
groups against themselves. Since then old_to_new_group_names only ever
holds identity entries, and kerning referencing a non-default master's
own name for a group is dropped rather than renamed. No test noticed:
groups_renamed_to_match_master only pins that the merged map equals the
default's groups, which holds whether renaming works or not.

Assert all of the above, including the fixture premise #338 built the
WghtVar groups around (Bold's the_WrOng_name = the default's
correct_name members), so a fixture change cannot quietly defuse the
tests.
anthrotype added a commit that referenced this pull request Jul 14, 2026
Dead since #636 (see previous commit): the rename map only ever holds
identity entries, the loop's warnings are unreachable, and validating
kern references against the map's keys is equivalent to validating
against the groups map directly, so do that. Remove the map (#338), the
loop, and the now-unused side_ord helper; rename
groups_renamed_to_match_master to groups_come_from_default_master,
which is all it ever asserted.

The previous commit went through CI on its own first, all checks green
with the machinery still in place:
https://github.com/googlefonts/fontc/actions/runs/29348074906

No output change. Divergent per-master groups get handled for real with
the port of ufo2ft#996 (#339).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants