googlefonts / googlefonts/fontmake

Wish: Designspace Completer

Open
#609 6 comments 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
888
Forks
97
Avg merge
4d 52m
Merged PRs (30d)
1

Description

## Wish: Designspace completer

There are several tasks for which a new tool is needed, a DesignSpace and/or font "completer". It could solve https://github.com/googlefonts/fontmake/issues/607 but also the following:

You know that the Designspace for VF needs all masters to be addressable from the neutral by a single move along one axis, and also how .designspace does not allow you to define regions for intermediates.

So right now, what one needs to do is to turn a dev designspace into a production designspace by:

### Completing master alignment

For example when I have 2 axes with 4 corner masters and I'd like to use the center as my neutral — 5 more masters are then needed to go from 4 to 9. These masters CAN be interpolated from the 4, and THEN varLib could build the VF. That could be a step done by the completer.

### Restricting intermediates by adding countermasters

If you have 2 axes with 4 corner masters and you add 1 intermediate at one of the edges, due to the way VF works, it's unrestricted so it pushes all its deltas to the opposite edge, ruining the interpolation. So a countermaster is needed at the opposite end, which is purely interpolated without taking that intermediate into account. Than you have 6 masters, not 5, and then you get the result you want. Again, this can also be done in software, so it's a task for the completer.

### Desparsing

And the other completer task could be "desparsing" sparse masters to address the problem of https://github.com/googlefonts/fontmake/issues/607

I personally think that work would need to be done on GPOS varmerging in varLib so it's not "stupid". I think right now it just goes by lookup indices and GIDs. But it probably should go by single rules, adding deltas to actual rules defined in lookups assigned to specific features.

Alternatively, there could be a step that takes a neutral master, and your static sparse, and then builds a fake master that is based on the neutral, but with the sparse glyphs patched in, and with a
GPOS where all the adjustments are set to 0 except those defined in the sparse GPOS.

And then varLib would use that fake master instead of your real sparse.

### Conclusion

It's not a hard problem. Figuring out the locations for the locations of the extra masters needs to be done carefully. But overall, it's solvable but code needs to be written.

It's also a "universal" solution — by large, I think there's only one good way to solve this. So that qualifies for an opensource tool, unfortunately one that is beyond my abilities.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.