Organizing ligatures and kerning pairs

Get help with FontCreator here. Please do not post feature requests or bug reports here.
Dan Kreider
Posts: 92
Joined: Thu Mar 25, 2021 8:35 pm

Organizing ligatures and kerning pairs

Post by Dan Kreider »

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?
Dan Kreider
Music engraving and hymnal publishing
dankreider.com
hymnworks.com
Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 9874
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Re: Organizing ligatures and kerning pairs

Post by Bhikkhu Pesala »

Do you use Class Based Kerning?

That will make a massive difference to the number of pairs that you need to define.
My FontsReviews: MainTypeFont CreatorHelpFC15 + MT12.0 @ Win 10 64-bit build 19045.2486
Dan Kreider
Posts: 92
Joined: Thu Mar 25, 2021 8:35 pm

Re: Organizing ligatures and kerning pairs

Post by Dan Kreider »

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.
Dan Kreider
Music engraving and hymnal publishing
dankreider.com
hymnworks.com
Erwin Denissen
Moderator
Moderator
Posts: 11108
Joined: Fri Oct 04, 2002 12:41 am
Location: Bilthoven, The Netherlands
Contact:

Re: Organizing ligatures and kerning pairs

Post by Erwin Denissen »

Dan Kreider wrote: Mon Mar 29, 2021 1:41 pm 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;
}
Erwin Denissen
High-Logic
Proven Font Technology
Dan Kreider
Posts: 92
Joined: Thu Mar 25, 2021 8:35 pm

Re: Organizing ligatures and kerning pairs

Post by Dan Kreider »

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.
Dan Kreider
Music engraving and hymnal publishing
dankreider.com
hymnworks.com
Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 9874
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Re: Organizing ligatures and kerning pairs

Post by Bhikkhu Pesala »

In my Pali Font, I have defined Oldstyle figures like this:
OldStyle Figures Lookup.png
OldStyle Figures Lookup.png (28.63 KiB) Viewed 4375 times
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
OldStyle Figures Class.png (51.08 KiB) Viewed 4375 times
Now I can rewrite the lookup using a single line of code.
OldStyle Figures Class Lookup.png
OldStyle Figures Class Lookup.png (16.57 KiB) Viewed 4375 times
My FontsReviews: MainTypeFont CreatorHelpFC15 + MT12.0 @ Win 10 64-bit build 19045.2486
Dan Kreider
Posts: 92
Joined: Thu Mar 25, 2021 8:35 pm

Re: Organizing ligatures and kerning pairs

Post by Dan Kreider »

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.
Dan Kreider
Music engraving and hymnal publishing
dankreider.com
hymnworks.com
Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 9874
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Re: Organizing ligatures and kerning pairs

Post by Bhikkhu Pesala »

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.
My FontsReviews: MainTypeFont CreatorHelpFC15 + MT12.0 @ Win 10 64-bit build 19045.2486
Dan Kreider
Posts: 92
Joined: Thu Mar 25, 2021 8:35 pm

Re: Organizing ligatures and kerning pairs

Post by Dan Kreider »

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.
Dan Kreider
Music engraving and hymnal publishing
dankreider.com
hymnworks.com
Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 9874
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Re: Organizing ligatures and kerning pairs

Post by Bhikkhu Pesala »

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
Lookup Superscript.png (48.43 KiB) Viewed 4355 times
My FontsReviews: MainTypeFont CreatorHelpFC15 + MT12.0 @ Win 10 64-bit build 19045.2486
Dan Kreider
Posts: 92
Joined: Thu Mar 25, 2021 8:35 pm

Re: Organizing ligatures and kerning pairs

Post by Dan Kreider »

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!
Dan Kreider
Music engraving and hymnal publishing
dankreider.com
hymnworks.com
Dan Kreider
Posts: 92
Joined: Thu Mar 25, 2021 8:35 pm

Re: Organizing ligatures and kerning pairs

Post by Dan Kreider »

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.
Dan Kreider
Music engraving and hymnal publishing
dankreider.com
hymnworks.com
Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 9874
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Re: Organizing ligatures and kerning pairs

Post by Bhikkhu Pesala »

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
Enabling OpenType Features in PagePlus.png (37.44 KiB) Viewed 4346 times
My FontsReviews: MainTypeFont CreatorHelpFC15 + MT12.0 @ Win 10 64-bit build 19045.2486
Dan Kreider
Posts: 92
Joined: Thu Mar 25, 2021 8:35 pm

Re: Organizing ligatures and kerning pairs

Post by Dan Kreider »

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.
Dan Kreider
Music engraving and hymnal publishing
dankreider.com
hymnworks.com
Dan Kreider
Posts: 92
Joined: Thu Mar 25, 2021 8:35 pm

Re: Organizing ligatures and kerning pairs

Post by Dan Kreider »

I just confirmed: Dorico does not support OpenType features like small caps, old style numbers, etc.
Dan Kreider
Music engraving and hymnal publishing
dankreider.com
hymnworks.com
Post Reply