Support deferred source generation in glyphs2ds op - #1223
Draft
madig wants to merge 2 commits into
Draft
Conversation
RickyDaMa
suggested changes
Sep 4, 2026
| def source_step_to_object(self, step): | ||
| source: str = step["source"] | ||
| return self._ensure_named_file(source, type="source") | ||
| target_base_name: str | None = step.get("target_base_name") |
Contributor
There was a problem hiding this comment.
In the example you showed me, you're doing
source: foo/MyFont.glyphs
target_base_name: MyFontWhy not just use pathlib to get the stem? Path(step["source"]).stem
The top-level source stem(s) are already used as a source of truth when constructing the final compiled font file name when using the default googlefonts recipe builder, so it's an established precedent that source names should be sensible. Saves specifying the redundant information with a confusing (imo) attribute name
Contributor
Author
There was a problem hiding this comment.
Hm, that might be even easier, provided glyphs2ds ensures that the glyphs2ufo op spits out a Designspace file with that stem, need to double check. This would replace the while family name lookup?
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.
When switching sources,
glyphs2dscurrently requires the new sources to already exist, which doesn't work when the previous step produced them. Solve this by adding an optional field to thesourcerecipe step where you can fill in the missing info.Todo: