I’m creating an iconfont for the web and I want to generate CSS based on the glyph names. However, I can’t seem to get Glyphs to export my custom glyph names. They import okay, but if I immediately export after importing and then reimport that .otf, they’re gone and replaced with their unicode in the default
The weirdest part is, sometimes one glyph out of 100 has the right name. But only if I use snake case for the glyph names? So, a name like
google_drive_icon might survive the export but
I have the
Keep glyph names from imported files user preference checked and the
Use custom naming font setting checked.
Is there a way to get Glyphs to not touch my glyph names? I know it does otf features magic or whatever, but since this is an iconfont, I don’t care about that. Thanks.
What you want is a so-called production name. You can set it either by adding an custom GlyphData XML or by choosing Edit > Info for Selection (Cmd-Opt-I) in Font View.
For unicoded glyphs in a CFF/OTF I do not recommend that though, because there are some expectations concerning the glyph names, and the font may not work as expected otherwise. What do you need non-standard production names for?
Thanks for the help. That makes perfect sense.
To answer the question of why: I’m looking to automate the process of updating the iconfont—ideally our designer adds a glyph, gives it a custom name, and I run a script that updates the font in the codebase and generates the appropriate human-readable-name/unicode pair in CSS for use on the web. As far as I can tell, there isn’t a better option for attaching metadata that’s easy for the designer to add and easy for me to parse out.
What about your own custom table?
Icon fonts it is OK to use custom names instead of uniXXXX names. I plan to change the default behaviour to use manually set names.