Conversation
|
This is clever but doesn't work. If you decompile the cmap table (as we did to find the existing Unicode mappings), the mappings are stored internally in the font object as codepoint => glyph names. Changing the glyph names in the (Incidentally this is why fonttools-rs uses glyph IDs rather than glyph names everywhere.) |
|
I'm probably being dense here but I thought all our VFs already have production names? do you need this because you have a custom build pipeline that only uses a few pieces of fontmake? |
|
Yeah, basically. I've put it into a custom script in my font's repo, but I figured if this is something that fontbakery has a check for, it should also be something that gftools should have a fix for... |
This adds a fix for the fontbakery glyph naming check; it uses ufo2ft's logic to rename glyphs to production names. This is useful because in a variable-first workflow, you build the variable font first and then add GSUB/GPOS/GDEF tables to it from a variable feature file afterwards. To do this, the glyph names in the font have to be the same as the ones in the feature file, and hence you have to pass
--no-production-namesto fontmake, and then do the renaming afterwards. (You could use Rust'sttf-rename-glyphsbut that's not part of our workflow yet. ;-)Because this is a slightly obscure use case, I've not added it to
fix_font.