Are `LIG` parts of opentype code generated or hand-written?

I am trying to understand the OpenType features of Fira Code, but I’m slightly stuck on one point: there are quite a lot of instances of the word “LIG” in the calt feature, and I’m unsure what that means or how it connects to the overall OpenType feature spec.

Here’s an example of the code:

lookup less_equal_equal_greater {
  ignore sub less less' equal equal greater;
  ignore sub less' equal equal greater greater;
  sub LIG LIG LIG greater' by less_equal_equal_greater.liga;
  sub LIG LIG  equal' greater  by LIG;
  sub LIG  equal'  equal  greater  by LIG;
  sub less'   equal   equal  greater  by LIG;
} less_equal_equal_greater;

Are these LIG strings generated by GlyphsApp, or do you think they were written by the creator of the project? Are they something like a chained lookup for contextual substitution, or are they some kind of self-referential lookup, or something else? I’ve tried digging into the text of the .glyphs file, and I’ve tried converting to UFO, but I’m still having trouble understanding where those are established or what they’re connected to.

This is also something I’ve asked in the Fira Code repo, but I figured there might be some insights here.

Thank you so much for any perspectives!

The LIG is a special empty glyph.

1 Like

I had to deal with the code once. Much of it is a hack to make it work in text editors.

1 Like

Awesome, thanks for the quick responses!

Yes, Tonksy explained it nicely, here:

For my own code ligatures, I will probably try to use the Ligature Caret as defined in the OpenType spec and hope that this feature becomes better-supported (seems like it should be supported for scripts like Arabic, anyway). However, it’s really helpful to understand what exists so far.