Large GSUB and replacement feature issues

As part of an investigation into the variable font suitability of Glyphs sources for various complex scripts part of the Noto project I stumbled over a couple of Glyphs 3 issues.

It is possible to generate fonts, normal non-variable TTFs, for Noto Serif Devanagari with fontmake and Glyphs 2. The binary GSUB exceeds 64Kb so there should be extension lookups involved. But Glyphs 3 gives me:

I do not understand how to get an overflow a subtable of a lookup. I will forward the file so it can be investigated.

Trying to understand if there really is a giant lookup for some reason, I discovered that Glyphs 3 cannot display or edit the Replace Feature and Replace Prefix custom parameters.
It looks like this:

The screenshot shows the Replace Prefix parameter. Apart from the display, the pop-up should allow to choose the prefix entries in the Features panel, but it provide a list of feature tags only. The Replace Feature probably should limit the list of tags to those defined in the Features only.

In the new feature compiler in Glyphs 3, we’re not switching to extension lookups automatically yet. That is in the works. Until it’s ready, you can mitigate the issue by adding the useExtension flag to those lookup blocks that you suspect might be triggering the issue. (The error message can be misleading, I agree. It comes deep from an old code on our side and it’s shown for all offset overflows, including lookup offsets.)

The problems with the Replace Feature edit view is a known issue. Sorry about that :slight_smile:

Well, after investigating the file you’ve sent us, it might be a subtable overflow after all. I’ll dig into it more and get back to you as soon as possible (with both the overflow issue and the unusable Replace Feature view).

1 Like

Thank you for looking into it.

I added useExtension to the large lookups in the iMatraHalformSubs prefix (for the regular) and in one of its replacements (with Glyphs 2), and I could generate these two fonts after all.

Interesting to notice that fontmake produces a 74K GSUB. Glyphs 2 without useExtension 72K. With useExtension Glyphs 2 brings the table to 123K. For Glyphs 3 it is a 169K GSUB. I have not tried what useExtension does with fontmake.

I guess Noto Serif Devanagari is an interesting test case for font generation software, both for Glyphs and fontmake (for which I have to report a new issue too).

I fixed the Replace Feature view. Should be usable with the next update. We’re still investigating the GSUB size differences.

Indeed :slight_smile:

The replace code shows up fine in the update. You probably want to fix the pop-up gadget too in due course. But at least it is possible to see what is there!
I followed the advice in the Feature File specification to add the useExtension keyword to the largest lookups. But the effect is much more dramatic as what I expected. Not sure if it is a good strategy. If you have the subtable data stored in lookup order, there might be some small lookups at the end that may need 4 byte offset only to jump over the rest.

We have identified the problem and a fix should be ready, soon.