Complex Arabic font feature files

Hi there,

I’m working on a complex Arabic calligraphic font with over 5,000 glyphs and a large OpenType feature set — structured into more than 200 external .fea files using include().

My workflow is to keep features outside Glyphs and compile them via fontmake, since GlyphsApp crashes as soon as I try to paste or load more than a few hundred lines of feature code.

Additionally, trying to export the project to UFO from within Glyphs also crashes the app (even with all includes disabled). I’ve had to export UFO externally just to continue testing.

At this point, I’m wondering:

– Is there any known workaround for editing/compiling large feature sets in Glyphs?
– Can Glyphs be made to export UFO without attempting to compile the features?
– Or is GlyphsApp fundamentally not designed for this type of workflow?

App version: 3.4 (3414)
macOS: 15.5
Font structure: Arabic, 5000+ glyphs, contextual chaining, nested classes, cursive anchors, calt chaining

Any advice is welcome. Thank you!

— Hamzeh Naghdi

It is not the amount of feature code that causes the crash. Is suspect some some unusual data somewhere else that is accessed when compiling the feature code.
Can you send me the file in the state when it crashes on export to .ufo? And the exact steps it needs to crash it when pasting the feature code?

1 Like

Hi @GeorgSeifert,

Problem 1: Export to UFO crashes Glyphs

When I try to export the font to .ufo via File > Export > UFO..., Glyphs crashes immediately. This happens even if I disable automatic feature generation and rely only on my external .fea files (see below).

I later had to use glyphsLib in the terminal to convert the .glyphspackage into UFO, just to continue development externally via fontmake.

Problem 2: Pasting feature code causes crash or freeze

If I try to paste my feature code into the Features panel, the app freezes and crashes. The total feature codebase is over 6,000 lines, split across:

  • ~950 class definitions (+Def_xxx, +Alt_xxx)
  • ~96 GSUB lookups (each with multiple substitution rules)
  • a large calt feature that chains all lookups

My assumption was that this crash is due to feature size. But you mentioned it might be caused by unusual data elsewhere in the file. If needed, I’m happy to send the .glyphspackage version that causes the crash on export, along with the .fea source.

Sample of my feature structure:

Here’s a quick summary of the structure (code sample included below):

  • languagesystem arab dflt;
  • 950 class definitions (some examples below)
  • 96 named lookup blocks, all for context-based substitutions
  • 1 feature calt calling all 96 lookups
  • Total: ~6,125 lines

This structure compiles perfectly via fontmake, and I’ve tested many times using UFO + ufo2ft. But inside Glyphs, it crashes when pasted or when attempting export.

Questions:

  1. Is there a known size or structural limit in Glyphs 3 for OpenType features?
  2. Is there a way to disable compilation during UFO export?
  3. Should I completely avoid using the feature panel and instead work only via external UFOs?

Thank you for your time and great support.

— Hamzeh Naghdi

languagesystem

languagesystem arab dflt;
languagesystem arab FAR;

Prefix = All Classes → init + medi + fina

be pe te th no ye (init} + al {fina) → با پا تا ثا نا یا

+Def_001 = [uni0628.init uni067E.init uni062A.init uni062B.init uni0646.init uni06CC.init uni0627.fina];
+Alt_001 = [uni0628.init.001 uni067E.init.001 uni062A.init.001 uni062B.init.001 uni0646.init.001 uni06CC.init.001 uni0627.fina.001];

ha {medi} + ye {fina) → ـهی

+Def_954 = [uni0647.medi uni06CC.fina];
+Alt_954 = [uni0647.medi.029 uni06CC.fina.022];

All Classes → Total lines = 3825 lines

Prefix = lookups GSUBs

lookup GSUB_001 {
sub +Def_001’ +Def_001 by +Alt_001;
sub +Alt_001 +Def_001’ by +Alt_001;
} GSUB_001;

lookup GSUB_096 {
sub +Def_954’ +Def_954 by +Alt_954;
sub +Alt_954 +Def_954’ by +Alt_954;
} GSUB_096;

lookups GSUBs → Total lines = 2196 lines

features = calt

feature calt {
script arab;
lookupflag RightToLeft IgnoreMarks;
language dflt;
language FAR;
lookup GSUB_001;
lookup GSUB_002;
lookup GSUB_003;

...

    lookup GSUB_094;
    lookup GSUB_095;
    lookup GSUB_096;

} calt;

feature calt → Total lines = 102 lines

All features Code → Total lines = 6125 lines

"Please interpret the + symbol as @.

Due to posting limitations with the @ symbol, it was temporarily replaced with + in the code."

The crashes have to do with the font itself, less with the code. Could you send me the .glyphs file?

When you like to post source code in the forum, put three ``` (grave signs, backticks) in the line before and after the code.

1 Like

I have sent you the file along with all the code content via direct message.
I hope the issue can be resolved with your help.

Thank you,
Hamzeh

Thanks for the file. I fixed the ufo export crash. It had to do with the missing cap height.

200 .fea files seems a bit excessive. I would get confused between them. I’m not sure about the performance implications.

1 Like