Two Discretionary Ligatures for the Same Letter Combo

Thomas WeakleyThomas Weakley Posts: 59
edited March 2020 in Technique and Theory
Hey all,

I tried to program two different discretionary ligatures for same letter combination in FontForge and it didn't work. To clarify I wanted to see if it would be possible to have two different ligatures available for W_E. When I tried to access the second discretionary ligature in Creative Cloud I was unable. I couldn't even make it display by selecting it in the glyphs panel.

I could be totally wrong here but it appears to me that the OpenType functionality of discretionary ligatures does not support multiple substitutions for the same letter combination. If I am wrong perhaps this is more of a software discussion.

The typeface I'm creating has many possibilities for ligature combinations of the same two letters. Many of these combinations can also be achieved through combining alternate characters but some ligatures are one solid, combined glyph (See E_D in screenshot below).

Should I just create unicode slots for the additional ligatures and expect users to access them through the Glyphs panel?

This typeface is a display face — uppercase only. So lowercase unicode slots are naturally filled with uppercase characters. What are people's thoughts on setting one ligature for upper case combos and another for lowercase combos? Would this be confusing and produce unexpected results for the user? I've seen other designers set alternate characters in the uppercase unicode slots and default characters in the lowercase slots for display faces. This seems like dangerous territory, especially if someone is passed the font file without instructions. Thoughts on this?

In my opinion all of the ligatures in my typeface are decorative and belong only as discretionary.

Here is a screenshot of some of the alternates and ligatures I've been developing for good measure:

Many thanks!


  • Thanks @Georg Seifert. I just read through the link and the language is unfamiliar to me as I haven't used Glyphs. Could you give me the gist of it? Is it possible to program multiple discretionary ligatures for the same pair?
  • John HudsonJohn Hudson Posts: 2,827
    A ligature substitution in OpenType Layout is a GSUB LookupType 4 (many-to-one).

    An alternate substitution is a GSUB LookupType 3 (one-to-one-of-many).

    So, no, you can't have alternate substitutions that are also ligature substitutions (many-to-one-of-many). The format doesn't support this.

    You'll need to decide which ligature is your preferred default form, and then assign the second ligature to a separate stylistic variant feature.
  • Kent LewKent Lew Posts: 905
    As John implied, the alternative discretionary ligatures will need to be made accessible through a combination of features — i.e., to get an alternative discretionary ligature, both {dlig} and {ss##} are applied simultaneously.
  • @Kent Lew @John Hudson Thank you very much for explaining! The {dlig} and {ss##} combo sounds like a rabbit hole I'm not prepared to go down without proper instruction. I'm leaning toward setting different sets of ligatures for uppercase and lowercase.

  • Thomas PhinneyThomas Phinney Posts: 2,585
    edited March 2020
    It really isn’t as scary as it sounds!

    Assuming 'dlig' comes before 'ss01' you would do:

    <p>feature dlig {</p><p><br>&nbsp; &nbsp;sub E D by E_D;<br></p><p>} dlig;<br></p><p><br></p><p>feature ss01 {</p><p><br>&nbsp; &nbsp;sub E_D by E_D.ss01;<br></p><p>} ss01;<br></p><p></p>

  • @Thomas Phinney Sorry for the delayed reply. I really appreciate you sharing this snippet. The truth is I've never even seen the source code for my typeface. I've been using FontForge's UI for everything. When you adjust the code in a typeface do you just open the font file in a source code editor?
  • Grzegorz Luk (gluk)Grzegorz Luk (gluk) Posts: 123
    edited April 2020
    @Thomas Weakley In FontForge you can do most of these things with UI, but if you want to work with a source code of OpenType features, You can export specific OT feature with "Save Lookup" from "Font info":

    write/edit feature manually, and import .fea file with File"Merge Feature info..."

  • @Grzegorz Luk (gluk) Thank you! This is very helpful!
  • Adam JagoszAdam Jagosz Posts: 688
    edited April 2020
    Here's my two cents: In general, you might want to export the feature code with a very small number of features just to learn how the features you made within FontForge are represented with .fea code (in additional to external learning resources), and then move on to writing your code from scratch and importing it into FontForge, because the other way around is not very convenient. Humans are good at writing code but computers are generally better at reading it — and FontForge compiles the code into its internal representation as you can see it in the final font file (as lookup tables) and when you export it back you will not get the original code, but a dumbed-down version of it.
  • @Adam Jagosz Thank you for that insight!
Sign In or Register to comment.