Designspace.lib["skipExportGlyphs"] must override invididual UFO's lib.plist when building statics#1146
Merged
anthrotype merged 1 commit intomainfrom Jun 4, 2025
Conversation
rsheeter
approved these changes
Jun 4, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://fonttools.readthedocs.io/en/latest/designspaceLib/index.html#public-skipexportglyphs
ufo2ft already does the right thing when fontmake gives it a designspace to build a VF, or when fontmake calls ufo2ft.instantiator to interpolate static UFOs.
However, when fontmake builds static master TTFs from a designspace input (i.e.
-o ttf -m Font.designspacebut without the-iinterpolate flag to build instances), then it simply loads the master UFOs as individual sources and calls compileTTF/compileOTF on each UFO. ufo2ft then reads the "public.skipExportGlyphs" in each individual UFO lib.plist, which should not have happened because fontmake started compiling from a designspace (but ufo2ft can't know that).This PR fixes it, by reading the skipExportGlyphs key inside the designspace.lib (can be missing or empty) and passing it as parameter to ufo2ft compileTTF/compileOTF methods (this overrides whatever skipExportGlyphs in the UFO lib.plist).
The bug was spotted in googlefonts/fontc#1507
It is a minor bug and we may actually prefer to close as wontfix. There may be old projects out there relying on the fact that
fontmake -m Font.designspace -o ttfis a shorthand for a bunch offontmake -u Font-{Light,Regular,Bold}.ufo -o ttfetc.