Ligature substitutions in FontLab

I found the solution to the issue I mentioned in this post:

I would also like to make a special feature in this font – when you type JMN, it should replace those letters with my signature (a custom made glyph). I’m pretty sure that’s possible, but I don’t know what it’s called.

By reading a little bit about “ligature substitutions” in the FontLab user manual, I figured out that I had to do a little coding in FontLab, to specify which glyphs should be replaced, so I opened up the OpenType window in FontLab and typed in this piece of code:

feature sign {
sub j m n by _0000 ;
} sign;

It basically means that when you type jmn it should replace that with the glyph called _0000 (which contains my signature). This worked inside of FontLab, but when I exported the font and tried it out in Illustrator, the ligatures didn’t show up. I posted this video at Typophile to get some help. The user twardoch told me, that for all ligature subs I should use the “liga” feature name. He also advised me to name my glyphs more logically: maybe “j_m_n” instead of “_0000”. So, I went back to FontLab and changed the code and naming:

feature liga {
sub j m n by j_m_n ;
sub L y u b a by Lyuba ;
} liga;

I exported (generated) the font, and it worked :) As you’ll notice, I figured out that I can have multiple substitutions within one liga feature. Pretty neat!

This entry was posted in Howto, Typography. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *