Organizing ligatures and kerning pairs

My font is getting a lot of ligatures and kerning pairs. Is there a way to keep these organized better than just in one long list?

Do you use Class Based Kerning?

That will make a massive difference to the number of pairs that you need to define.

No, I didn’t. Ah well, I’ll know for next time on that.

What about the ligatures? Is there a way to group them? I see something called “subclasses,” but I don’t want to mess up what I’ve done.

You can make use of classes, but it has restrictions and might not work as expected.

This would work:

class @digits [zero-nine];

lookup Ligature1 {
sub @digits slash A → B;
}

Hi Erwin, I’m sorry, what you wrote is Greek to me. Could you steer me towards where to learn about what you just wrote? Thanks.

In my Pali Font, I have defined Oldstyle figures like this:
OldStyle Figures Class Lookup.png
The lookup needs ten lines of code.
I already have a class for figures, but I could add another class for Oldstyle Figures.
OldStyle Figures Class.png
Now I can rewrite the lookup using a single line of code.
OldStyle Figures Lookup.png

Hmm, that’s a step in the right direction. I have some questions:

  1. There are two kinds of lookups, right? GPOS (kerning) and GSUB (ligatures)?

  2. Is this a ligature? I thought ligatures were taking combinations of glyphs and substituting them for a new glyph, but this looks like using a whole class of glyphs as single substitutes.

  3. How would this “class” get turned on? What I mean is, how do you tell the program that you want to change to the old-style number class?

  4. Does all that code get put into one long document? It’s XML? Is it best to enter it in this way, or is there a GUI way to enter this information easily?

Thanks, this is new to me, but I think I get the basic idea, just working on how to do it correctly.

Does your music program support OpenType ligatures and GPOS kerning?

The lookup is for a single glyph substitution not for ligatures, but it illustrates the use of classes. When the OpenType Oldstyle Figures feature is enabled, ordinary figures one, two, etc., are substituted with one.onum, two.onum, etc. The two classes both need to have the same number of members (10).

Ligature substitutions, replace f + f + i with ligature ffi, etc.

Open the OpenType Designer (Ctrl+F8) then click the button to open the code editor.

Thank you for the reply. Yes, it supports OTF. I’ve used both GSUB and GPOS in it already, they are just sloppy and not efficiently organized.

So are single substitutions a subset of GSUB? Or a different type of lookup? Am I using the right terms?

How would the user enable that feature? That is, how would they decide when to switch from regular numbers to old style? Or is that fixed in the font? Can the user alternate between both styles?

Am I correct in assuming that this sort of class substitution would be how to enable superscripting? I would like to design superiors for that.

Substitutions Supported by FontCreator 13.

For your superscripts, I presume that you need single substitutions like two → twosuperior (2 → ²)

My lookup for superscripts uses classes to reduce the number of lines of code needed.
Lookup Superscript.png

Many thanks, I will follow that link. I am definitely expecting to put in the work myself to learn this, but it’s definitely helpful to have some direction on where to look!

Ok, I see how to construct some single substitutions.

But how do I “trigger” these substitutions? Let’s say I want to use square brackets to switch to superiors. How do I set that up?

Thanks.

That is why I asked if your program supports OpenType features. You may be confused between OpenType fonts and OpenType features. Programs that support some OpenType features may enable standard ligatures by default (Notepad does this), but have no interface to enable ligatures, ordinals, Oldstyle Figures, etc.

To trigger superscripts with square brackets you need a contextual substitution.

Before we go down that road, we need to be sure which OpenType features your application supports, if any. This is how Serif PagePlus does it.
Enabling OpenType Features in PagePlus.png

Ok, I see. Kerning and ligatures are turned on by default, but user has no control over them. I will check with the devs and confirm what Dorico supports specifically.

I just confirmed: Dorico does not support OpenType features like small caps, old style numbers, etc.

I would like to pursue contextual substitution for this, please! Not sure where to start.