-
Notifications
You must be signed in to change notification settings - Fork 22
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
[fontra-workflow] add decompose-components action #1194
Comments
hey @justvanrossum, I'm working on a feature in ufo2ft that is somewhat related to this PR and wanted to ask you something. I see your DecomposeComponentsAction takes a VariableGlyph that may contain some components and instantiate it at all of its source locations and draws each source layer with the components converted to paths (or 'flattened' in your terminology -- to me, "to flatten components" means to keep them as components but with a max depth of 1, removing nested components of components, but that's not the issue). But what about the reverse of this? i.e. the composite glyph that you are decomposing definees fewer sources than some of its component glyphs: e.g. "edieresis" uses "e" and "dieresis" as components, all three glyphs define a Regular and Bold weight but only "e" defines an additional Medium weight where it adjustes, don't know, the thickness of the horizontal stem or whatever. I'd expect that while or immediately before decomposing "edieresis" composite glyph, an additional Medium source layer gets interpolated and inserted among "edieresis" sources. Context is googlefonts/glyphsLib#954 (I initially started fixing this in glyphsLib but later on decided to fix it in ufo2ft and also allow DesignSpace+UFOs projects to avail themselves of a more relaxed composite glyphs definition that Glyphs.app enables, whereby variable composite glyphs, on the one hand, and the component glyphs they refer to, on the other, don't need to define exactly the same set of source locations, but are allowed to define more or less and things get interpolated as needed. |
Hi Cosimo, First off, you're right about "flatten" vs "decompose", and I started renaming: Your other question is also keeping me busy, because I need to implement that, too... I have not yet figured out the way to compute which sources need to be inserted to make the decomposed glyph behave the same as the composed glyph. I'll keep you posted, and I'll try to understand your proposed solution. |
they way I'm implementing it is, when I know I am about to decompose a composite glyph, I traverse the tree of components rooted at it and gather the set of all unique locations that I find, if any of these are not already defined for my composite glyph, I interplolate the layers and insert them as sources; only then I can proceed to decompose each of the variable glyph source layers. |
No description provided.
The text was updated successfully, but these errors were encountered: