Bad glyph names and how to fix it

Topy's picture

I have a bunch of alternative glyphs named incorrectly. For example, there is a "four_onum.alt".

-Is the correct way to name this four.onum.alt or maybe four.onum_alt would be better? From what I understand, four.onum1 is preferred, but it is not that descriptive as I would like.
-How big of a problem this kind of naming is and where the problems/compatibility issues would be likely to occur?

I'm also intersted to hear about possible ways to fix it. I found www.typophile.com/node/80760 where a "Rename Glyphs by Regex" script by Adam Twardoch was mentioned. This sounds like a tool for the job if it renames glyphs also in the opentype code and classes? However, I didn't find the actual script from Google. Is it publicly available, or should I just turn to Adam directly?

agisaak's picture

Any of four.onum.alt, four.onum_alt, or four.onum1 should be fine. There's no reason why the latter should be preferred AFAIK.

four_onum.alt, however is definitely not a good idea. The problem will arise in situations where a file is converted to postscript in the middle of a workflow (e.g. when using Acrobat Distiller) in which case unicode values will be lost and those values must be reconstructed from the glyph names.

In such cases, the unicode value is determined from the base name ignoring all dot suffixes. The base name must be either a legitimate postscript name (either a name from the Adobe Glyph List or a name of the form uniXXXX) or a ligature composed of legitimate names separated by underscores.

four_onum.alt would thus be interpreted as a ligature of four and (the non-legitimately named and likely nonexistent glyph) onum.

André

Topy's picture

I see, thanks André. So it's definitely something that I should fix. Damn.

agisaak's picture

I'm not familiar with the script Adam mentioned. Unfortunately I know of no easy way to rename all your glyphs all at once within FontLab. It's easy enough to change the final suffix en masse, but anything involving either the base or a non-final suffix must be done manually or via a python script.

André

Topy's picture

Yeah, I really would like to learn Python and do it myself. Both options seem a bit daunting tasks.

Syndicate content Syndicate content