Forum How do I...?

disabling automatic ligatures

mr_tommyguns
Is there any way to disable automatic ligatures? Reading some of the topics which have been posted about ligatures, it appears that this is a relatively recent addition (automatic ligatures). However, we're having some issues with a print vendor who cannot support CID Identity-H fonts and it appears the presence of an 'fi' ligature in the font we're using is what is causing the font to encode that way instead of using the 'Roman' encoding.

Please let me know if I can provide any further information.

Thanks!
mikeday
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.
mr_tommyguns
Thanks for the reply.

The problem has since expanded a bit - is there any way to disable use of the CID Identity-H encoding entirely? The presence of a ≥ in the rendered text appears to be forcing this. I read in an older topic that the presence of a non-latin character would cause that (which is reasonable), but I'm stuck trying to find _some_ way around this. Are you aware of any creative ways of getting around that encoding? Open to pretty much anything, though I'd rather avoid creating a transparent PNG of the glyph and using that if possible :).

Thanks again.
mikeday
The only way would be to cheat: create a font where the glyphs you want to use are encoded as other letters, eg. the "greater-than or equal to" character could be encoded as "a", the "less-than or equal to" character could be encoded as "b". Sounds like a big hassle, though.
mikeday
Update: in Prince 8.1 we are going to avoid using CID encoding for fonts unless it is absolutely necessary, eg. when more than 256 glyphs are being used for the same font. This should solve the problem in most common situations.
mr_tommyguns
Awesome. Thanks!
mikeday
Prince 8.1 is now available with the CID font workaround, hopefully this will solve the problem in almost all cases.