-
Notifications
You must be signed in to change notification settings - Fork 95
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
fontmake fails to remove hyphens in names from glyphs source #455
Comments
Context: https://forum.glyphsapp.com/t/do-all-glyphs-drop-their-hyphens-on-export/9519/3 & googlefonts/robotoslab#10 Seems high priority and perhaps relatively simple to fix :) |
For reference, i'm quoting below the latest version of Adobe Feature File spec as available on the github afdko repository (the one published on Adobe's website is not up to date apparently) ====== There are two different contexts for glyph naming: final production names and development names. For production glyph names, names that are used in shipping font files, the specification is set by the Postscript and Type 1 specifications, which define what is expected by existing PostScript interpreters. These limitations are as follows. A glyph name may be up to 63 characters in length, must be entirely comprised of characters from the following set: A-Z a-z 0-9 . (period) _ (underscore) and must not start with a digit or period. The only exception is the special character ".notdef". "twocents", "a1", and "_" are valid glyph names. "2cents" and ".twocents" are not. Development glyph names, names used in source data during the development of a font, have a larger supported character set. In addition to the characters allowed for production glyph names, the following characters must also be supported for development glyph names:
|
I think it should be the responsibility of ufo2ft PostProcessor to perform this, since it is already doing the renaming from development to production glyph names. |
and if they start with a digit or period, we prefix them with another underscore |
The OT spec for the post table points to the AGL specification which says the same: A-Z a-z 0-9 . (period) _ (underscore). |
makeotf/Glyphs really just drops the hyphen it seems (minus: Glyphs, plus: fontmake):
|
dropping invalid chars is fine. If we like we can handle potentially clashing names by appending a suffix with a digit, but anyway those glyph names that don’t get a proper uniXXXX or AGL standard name are junk so it’s not too bad if such clashes occur in practice |
If they are junk, why are we writing them to the post table anyway? |
fixed in googlefonts/ufo2ft#274 |
Glyphs App employs hyphens in glyph names do detail the script a glyph belongs to. This is normally not an issue for fontmake as those glyph names are converted to production names on export. The issue is that if a name is used which has no production equivalent then the hyphens are not removed.
In my case I was using "descender-cy" to make Cyrillic composites. I believe the practice in Glyphs is to drop the hyphen on export and I was wondering if fontmake could do the same
The text was updated successfully, but these errors were encountered: