12

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.

8
  • 6
    Note that many of fontspec's options just activate or not features of fonts, if those fonts have them. What they do - if they do anything - depends on the font itself. To know precisely what, you have to inspect the particular font or to just try it. Ligatures=TeX is different because it is specially designed to support traditional input of particular characters in the standard TeX way. So this doesn't depend on the font (provided the font has the required characters and is encoded correctly).
    – cfr
    Mar 1, 2016 at 12:53
  • Thanks, I understand that not all features will apply to all fonts. Still, what are these features?
    – alexis
    Mar 1, 2016 at 14:48
  • As @cfr says, that will depend on the font. Which ligatures the hlig feature will activate will depend on what ligatures the font in question activates with hlig.
    – Sverre
    Mar 1, 2016 at 20:14
  • 1
    There is no single agreed-upon standard that determines which types of ligatures fall into which category. It's common practice (pun intended) to place some of the f-ligatures (e.g., ff, fi, fl, ffi, and ffl) in the group of "common" ligatures. However, practice among font designers quickly diverges as to how the other f-ligatures (e.g., ft, fft, fb, ffb, fk, fr, etc), let alone other ligatures such as ct, sp, st, etc., should be classified. You'll have to go font by font and figure out which ligatures are provided and how the available ligatures were classified.
    – Mico
    Mar 1, 2016 at 20:21
  • @Mico, thanks, that's the kind of information I was after-- I'm not insisting on iron-cast rules, if there aren't any. If you can think of other recurring option names and what they're likely to do, that would be the answer I'm hoping for.
    – alexis
    Mar 1, 2016 at 20:46

1 Answer 1

3

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).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .