Forum How do I...?

How to Avoid or Turn Off Ligatures

Our house style is to avoid ligatures as much as possible. Is there a way to turn off ligatures in a Prince PDF?


There is no official way of doing this, but there is an unofficial way:
p { font-variant: prince-opentype(ccmp) }

Normally Prince will apply two OpenType features to Latin text, the "ccmp" feature for glyph composition and decomposition, and the "liga" feature for standard ligatures. Here we are overriding this and saying only apply the ccmp feature. You can also use this to apply discretionary ligatures, or other OpenType features if you like.
Thank you!
The Prince latest build now supports the font-variant-ligatures property, which can be used to disable ligatures like this:
font-variant-ligatures: none

It is overridden by the font-variant property, which is now a shorthand property, so you will need to apply it with care if you also use small-caps (also available via the new font-variant-caps property).