TransWikia.com

What do the various values of the Ligatures= option of fontspec do?

TeX - LaTeX Asked on January 15, 2021

The fontspec package has a Ligatures option, usually encountered with the value Ligatures=TeX. This enables traditional TeX ligatures (or typing conventions) like mapping --- to an em dash. But what does each of the other options do? The fontspec documentation only gives a list of the options, without explanation. And the names are not particularly illuminating– what is the effect of Ligatures=Logos, for example? What “common” ligatures does Ligatures=Common enable?

I’d like to understand what the options are, and when they are useful/appropriate.

One Answer

The fontspec package basically just activates certain features available in the font. The options differ depending on what type of font it is.

For OpenType fonts

The following table shows which options are available and which features they load (from the latest version of the fontspec package documentation, fontspec.pdf, 2020/02/21, § 3.1.8 with table 11 on p. 41):

Option Tag
Required rlig
Common liga
Contextual clig
Rare/Discretionary dlig
Historic hlig
TeX tlig

What these do in the context of a specific font depends entirely on how the font designer set up that font. I would assume that fonts which make heavy use of such features come with a documentation that explains which ligatures are available and through which feature they are accessible. If not, you can inspect the font yourself using font editing software like FontForge or Glyphsapp (this will require that you can read OpenType feature code instructions).

If you want to know more about the features rlig, liga, clig etc., how they are intended to be used, how they differ from each other etc., you will find that information in the OpenType spec on the Microsoft website.

Note that the option TeX above is different from the others, as you already seem to be aware (and user @cfr has also mentioned). A feature tlig does not exist in the OpenType spec. This is something TeX-specific to emulate TeX's behaviour for interpreting certain ASCII input.

For AAT-fonts (Apple)

For AAT-fonts, fontspec accepts the following Ligatures options (§ 3.1 in the documentation):

Required, Common, Rare (or Discretionary), Logos, Rebus, Diphthong, Squared,
AbbrevSquared, and Icelandic

Some information on what these do is available in the section Font Feature Registry in the AAT specification on Apple Developer. Again, it depends on the individual font what will actually happen when you activate these features. (Some of these are discouraged from use, e.g. Logos; Icelandic does not seem to be mentioned in the spec).

Answered by lvcivs on January 15, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP