Export to UFO, OT features not using production glyph names

Hi all,

I exported to UFO and selected “Convert Glyph Names to Production Names”.

The resultant features.fea file has a lot of friendly names still intact and not converted to production names.
Most of the classes are converted properly, but things inside calt blocks for example still retain the friendly names.

Glyphs Version 2.2.2 (822)
OS X 10.10.5

Sample calt block

lookupflag IgnoreMarks RightToLeft;

# Seen-Hamza
sub [seen-ar.init sheen-ar.init seen-ar.medi sheen-ar.medi] yehHamzaabove-ar.medi' [lam-ar.medi lam-ar.fina] by yehHamzaabove-seen-lam-ar.medi;

# Kaf Init-Alef
sub kaf-ar.init' [alef-ar.fina alefHamzaabove-ar.fina alefMadda-ar.fina alefWasla-ar.fina] by kaf-ar.init.kaf-alef;
sub kaf-ar.medi' [alef-ar.fina alefHamzaabove-ar.fina alefMadda-ar.fina alefWasla-ar.fina] by kaf-ar.medi.kaf-alef;

# Reh-Alef
sub reh-ar.fina' [alef-ar alefHamzaabove-ar alefMadda-ar alefWasla-ar] by reh-ar.fina.reh-alef;
sub zain-ar.fina' [alef-ar alefHamzaabove-ar alefMadda-ar alefWasla-ar] by zain-ar.fina.zain-alef;

# Waw-Alef
sub waw-ar.fina' [alef-ar alefHamzaabove-ar alefMadda-ar alefWasla-ar] by waw-ar.fina.waw-alef;
sub wawHamzaabove-ar.fina' [alef-ar alefHamzaabove-ar alefMadda-ar alefWasla-ar] by wawHamzaabove-ar.fina.waw-alef;

# Ain-Alef
sub ain-ar.medi' [alef-ar.fina alefHamzaabove-ar.fina alefMadda-ar.fina alefWasla-ar.fina lam-ar.medi]  by ain-ar.medi.ain-alef;
sub ghain-ar.medi' [alef-ar.fina alefHamzaabove-ar.fina alefMadda-ar.fina alefWasla-ar.fina lam-ar.medi] by ghain-ar.medi.ghain-alef;

# Seen-Yeh & Sheen-Yeh variants
sub [seen-ar.init sheen-ar.init seen-ar.medi sheen-ar.medi]' @YEH_FINALS by [seen-ar.init.seen-yeh sheen-ar.init.sheen-yeh seen-ar.medi.seen-yeh sheen-ar.medi.sheen-yeh];
sub [seen-ar.init.seen-yeh sheen-ar.init.sheen-yeh seen-ar.medi.seen-yeh sheen-ar.medi.sheen-yeh] @YEH_FINALS'  by @YEH_FINALS_SEEN_YEH;

# Sad-Yeh & Dad-Yeh variants
sub [sad-ar.init dad-ar.init sad-ar.medi dad-ar.medi]' @YEH_FINALS  by [sad-ar.init.sad-yeh dad-ar.init.dad-yeh sad-ar.medi.sad-yeh dad-ar.medi.dad-yeh];
sub [sad-ar.init.sad-yeh dad-ar.init.dad-yeh sad-ar.medi.sad-yeh dad-ar.medi.dad-yeh]  @YEH_FINALS'  by @YEH_FINALS_SEEN_YEH;

Hey,

I encountered the same problem. According to @GeorgSeifert it will be fixed in the next version.

Sounds great! Any ETA? @arialcrime @GeorgSeifert

@arialcrime did you get an updated version that fixes this? Mine still has the problems mentioned :confused:

No, the problem still remains, even in the most recent cutting edge version 2.2.2 (824).

Can confirm this is still broken as of version 2.2.2 (824) despite the changelog saying it was fixed.

In my features file the problem begins in my first calt block, starting at sub kaf-ar.init'
You can test my .glyphs file from https://github.com/aiaf/kawkab-mono

lookupflag IgnoreMarks RightToLeft;

# Seen-Hamza
sub [seen-ar.init sheen-ar.init seen-ar.medi sheen-ar.medi] yehHamzaabove-ar.medi' [lam-ar.medi lam-ar.fina] by yehHamzaabove-seen-lam-ar.medi;

# Kaf Init-Alef
sub kaf-ar.init' [alef-ar.fina alefHamzaabove-ar.fina alefMadda-ar.fina alefWasla-ar.fina] by kaf-ar.init.kaf-alef;
sub kaf-ar.medi' [alef-ar.fina alefHamzaabove-ar.fina alefMadda-ar.fina alefWasla-ar.fina] by kaf-ar.medi.kaf-alef;

# Reh-Alef
sub reh-ar.fina' [alef-ar alefHamzaabove-ar alefMadda-ar alefWasla-ar] by reh-ar.fina.reh-alef;
sub zain-ar.fina' [alef-ar alefHamzaabove-ar alefMadda-ar alefWasla-ar] by zain-ar.fina.zain-alef;

# Waw-Alef
sub waw-ar.fina' [alef-ar alefHamzaabove-ar alefMadda-ar alefWasla-ar] by waw-ar.fina.waw-alef;
sub wawHamzaabove-ar.fina' [alef-ar alefHamzaabove-ar alefMadda-ar alefWasla-ar] by wawHamzaabove-ar.fina.waw-alef;

# Ain-Alef
sub ain-ar.medi' [alef-ar.fina alefHamzaabove-ar.fina alefMadda-ar.fina alefWasla-ar.fina lam-ar.medi]  by ain-ar.medi.ain-alef;
sub ghain-ar.medi' [alef-ar.fina alefHamzaabove-ar.fina alefMadda-ar.fina alefWasla-ar.fina lam-ar.medi] by ghain-ar.medi.ghain-alef;

# Seen-Yeh & Sheen-Yeh variants
sub [seen-ar.init sheen-ar.init seen-ar.medi sheen-ar.medi]' @YEH_FINALS by [seen-ar.init.seen-yeh sheen-ar.init.sheen-yeh seen-ar.medi.seen-yeh sheen-ar.medi.sheen-yeh];
sub [seen-ar.init.seen-yeh sheen-ar.init.sheen-yeh seen-ar.medi.seen-yeh sheen-ar.medi.sheen-yeh] @YEH_FINALS'  by @YEH_FINALS_SEEN_YEH;

# Sad-Yeh & Dad-Yeh variants
sub [sad-ar.init dad-ar.init sad-ar.medi dad-ar.medi]' @YEH_FINALS  by [sad-ar.init.sad-yeh dad-ar.init.dad-yeh sad-ar.medi.sad-yeh dad-ar.medi.dad-yeh];
sub [sad-ar.init.sad-yeh dad-ar.init.dad-yeh sad-ar.medi.sad-yeh dad-ar.medi.dad-yeh]  @YEH_FINALS'  by @YEH_FINALS_SEEN_YEH;

I fixed it again.

Hi @GeorgSeifert

This is still broken on Version 2.2.2 (826) OS X 10.10.5

Something new happens now, I have a custom glyph yehHamzaabove-seen-lam-ar.medi when exported to UFO with convert to production, it gets turned into this: yehHamzaaboveseenlamar.medi

Several other Arabic glyph names are also still not converted within calt blocks.

Additionally, when I open the UFO with Glyphs and hit “Update” in the Features tab, I get various syntax errors which are non-sensical e.g. “Error: “syntax error at “commabelowcmb.a” [features.fea 215” in Class COMBINING_MARKS in line: 1” (the syntax error moves places if I delete this class).

Attached is the .glyphs file I’m using (I exported & opened the Light Master as UFO) Kawkab Mono.glyphs.zip (226.2 KB)

Thanks!

(Edit: FEATURE REQUEST: I wish there was an option to simply have a raw text box where the .fea file is simply placed without additional parsing).

Such a .fea file is created in the Temp folder every time you export. Fastest way to access it is Script > Open Scripts Folder and open the Temp folder next to the Scripts folder.

When exporting to .ufo the glyph names are switched my there production name. If you have a name that has no corresponding production name Glyphs replaced the hyphens because they are not valid in final fonts. So the behavior you see is how it is supposed to work.

Is there a reason why glyphNames like Ocaron are renamed to names like uni01D1 during OTF export? Other glyphs right next to it don’t get renamed (as expected)

So in my exported OTF I got: O Oacute uni01D1 Ocircumflex Odieresis Ograve Ohungarumlaut

Named according to Adobe Glyph List For New Fonts. This behaviour is as documented/expected. Better question is why Glyphs insist on renaming “blackcircle” to “blackCircle” in the app. I get that it is “correct” according to the internal logic, but please don’t assume you know what I want to do!

Thanks for the Info. So this is basically the glyph’s productionName, as it appears. Right?

Production name for that particular glyph would be uni25CF.

If you open a font and you like to keep the its names, set the corresponding checkbox in Preferences > User settings.
The design name is blackCircle and the production name is uni25CF.

You can employ your own names with a custom XML.

Thanks all for the feedback. I could build a workaround with comparing the productionName (if not None) in glyphs with the glyphName in the exported font. Seems to work so far :slight_smile: No need for customizing a XML, but surely also good to keep in mind.

Yep. A pain in the ass if you want to do something other than what the app wants to do. Otherwise awesome :slight_smile: