Erroneous GDEF table

I am generating a font with a custom .xml glyph source. Glyphs shows me that the ligatures are correctly identified as ligatures in the Glyph Info box:

However, mark positioning is not working on ligatures, which made me inspect the GDEF table, and indeed, here the section for ligatures is empty (the xxx is just a placeholder for glyph names):

table GDEF {
GlyphClassDef [xxx],# Base
, # Liga
[xxx], # Mark

If that’s not a bug in Glyphs, how can I get it to work on my end? Thanks in advance.

Do you have caret anchors in the ligatures?

No, are they required?

I just checked, and caret anchors are only necessary for the LigatureCaretByPos rule in GDEF.

What you need for ligatures to be defined:

  • there must be combining marks with respective anchors (e.g., _top or _bottom)
  • there anchors for mark attachment must be set in the ligature (e.g., top or bottom)

That’s it.

Thanks Rainer, very odd. The marks are of course there and identified as marks, the anchors are there in standard form (_top and top). If I find the source of the problem I’ll post it here.

You can also send the file to me if you like. Vier Augen sehen mehr als zwei.

Ligatures need to defined as such in GDEF if you liga2mark attachment. For that, you need top_1, top_2 anchors (instead of the plain top ones).

Rainer, Georg, many thanks. I had a different suffix for the ligature marks (1ST and 2ND instead of 1 and 2), changing the suffix solved it.

1 Like

So it means the glyph names or anchor names determine whether GDEF includes ligatures, even if the glyph info shows ligatures correctly?

So it appears.

The GDEF categories are there to control certain aspects of the execution of GSUB or GPOS lookups. So if you have an IgnoreMarks flag in your code, all glyphs that are in the Mark class are ignored. But also only those in the Mark class are able to be positioned in the mark feature. The Ligature class is only needed for glyphs that are mentioned in the liga2mark feature. So putting them there and don’t mention them in the feature doesn’t change anything.

A post was split to a new topic: Wrong Gujarati mark-to-ligature code derived from conjunct anchors