-
Notifications
You must be signed in to change notification settings - Fork 475
[varLib] Accept DesignspaceDocument objects in build() and load_designspace() #1416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Sgtm. |
After a discussion with Cosimo, we want to support three use cases:
It's a bit unfortunate that |
@madig nice write-up, thanks 👍 |
This is a useful idea, if I understand it correctly, even without brace layers. I am currently dealing with a workflow where all the source fonts will have a full glyph complement, and I will have to subset some of them to temporary files to make sparse source fonts. With this PR, I think i can read in the original source fonts and attach the TTFont objects to the DesignSpace SourceDescriptor.font attributes, and subset them in memory. |
@readroberts correct |
Change it as you wish. |
Changing it might be something for 4.0. I'd like to think more on the API. Maybe we can move MasterFinder to the entry points instead of having them in |
@madig merged manually to https://github.com/fonttools/fonttools/tree/varlib-build-accept-ds-object branch, let's continue there |
We need a way to integrate sparse masters that come from ("brace") layers instead of stand-alone sparse UFOs. Instead of modifying
varLib.build()
andMasterFinder
to go look for specially named files like in #1387, modifyvarLib.build()
to take eitherTTFont
s to disk and refer to them with thefilename
attribute and probably adjustmaster_finder
)DesignspaceDocument
and demand that the caller already read and attached theTTFont
objects to allSourceDescriptor.font
attributes. ufo2ft will do this when calling https://github.com/googlei18n/ufo2ft/pull/300/files#diff-cd32d8abceb8eff27b2b4994f7322bc1R256.