Test: incorporate Glyphs source into build (to see whether we can shift over to Glyphs)
arrowtype opened this issue · comments
At a high level, here’s what I’m thinking of doing:
- We work in GlyphsApp to draw, proof, and kern the typeface
- The build (which currently takes UFOs, makes duplicates, and extends them) will start by converting the Glyphs source into UFOs, then carry on as before
- Critically, the build would need a way to write "bounce" information to the Glyphs source, as it currently does to the UFO font.lib of the primary extrabold and light sources.
So, tasks here will be:
- determine how to write
font.lib
style info to a Glyphs source - add logic to build to convert Glyphs source to UFOs as a first/early step
Task: Determine how to write font.lib style info to a Glyphs source
It seems that potentially userData
is the concept used for font.lib data in Glyphs.
Now the questions are:
- Is this true? Answer: Yes
- Can I set this in Python, via GlyphsLib? It looks like maaaaybe so? Answer: Yes
Was temporarily tripped up by a weird error, but it’s gone now: googlefonts/glyphsLib#795
- ? Add Cyrillic basic upper/lower to lines
Glyphs conversion is going well! Now just adapting/refactoring the rest of the build.
Next up:
- fix the below by finding requisite base fonts
🤖 Shifting bouncy alts
Traceback (most recent call last):
File "/Users/stephennixon/type-repos/shantell-sans/scripts--build/prep-build.py", line 980, in <module>
main()
File "/Users/stephennixon/type-repos/shantell-sans/scripts--build/prep-build.py", line 916, in main
shiftGlyphs(font, factor=0.75) # factor 0.75 makes moves of up to 75 units
File "/Users/stephennixon/type-repos/shantell-sans/scripts--build/prep-build.py", line 437, in shiftGlyphs
baseFont = Font(sources["extrabold"])
NameError: name 'sources' is not defined
This is getting close!
I can now build a test VF in this pipeline.
However, the calt for cycling Cyrillic glyphs isn’t quite working – but that is an issue from before.
The problem is, these glyphs are getting "uni" style names in the output TTF, so my current calt code isn’t catching them. The build prep needs to instead determine production names, and target these.
First, I’ll test just adding those glyph names to the calt
generating code as uni-style glyph names by opening the TTF in Glyphs, then copying uni names from there.
... hmm, if I do that, I then run into this fontmake build error:
The following glyph names are referenced but are missing from the glyph set: uni0404
I guess maybe I could try to...
- output production names in the build prep, when converting from GlyphsApp to UFOs?
- see if fontmake will update feature code based on production names?
- as a temporary test, prevent fontmake from applying production naming?
Nope, the above doesn't seem to make a difference. Fontmake already is updating default names to prod names in the GSUB table.
-
accented glyphs also now have misalignment in the accents. FixOr wait, actually: GlyphsApp just doesn't display them correctly when the VF is opened in GlyphsApp. In the generated UFOs and for the VF in FontGoggles, they are aligned well.
It’s confusing that alts are no longer working for Cyrillic, because they did previously ... at least for the bounce axis. Here is an older version, from the beta of the minisite:
I guess my next step is to build a font using the old, non-Glyphs pipeline, and then compare the output of the calt code and resulting GSUB table.
(Another observation: yShifts/bounces for Cyrillic seem to be smaller than for Latin. Maybe I should reset the bounces?)
I’ve moved the calt
issue to its own issue, as it was a problem before this build pipeline conversion.
I’ve also opened an issue for bounciness / y-shift in Cyrillic vs Latin: #88
Otherwise, I think this test was very successful! The issues it uncovered are separate, and I’m glad I uncovered them!