I have an old font I purchased a while ago. It comes with various ligatures that I need to use. The font was not intended for use with LaTeX, and even though it is a high-quality Type-1 font, the support for ligatures is quite Byzantine: Various ligatures are mapped to various characters, so # is some ligature, and $ is another, etc. It was designed to be hellish to type in. :-)

I have no problem using it within LuaLaTeX or XeLaTeX, but the mapping of ligatures to irrelevant characters is a problem. It's not only difficult to type, but more importantly, I'm concerned that my text shall be buried in a useless format by intermixing it with these silly punctuation marks that just "look right" when set in a particular font. I am unable to change the font (it's copyrighted), and I cannot find an equivalent font that uses a more sophisticated approach to ligatures.

Is there any reasonably civilized way to define my own ligature mapping in either LuaLaTeX or XeLaTeX, so that I could use the font as-is, type "normal" text, and have the LaTeX engine handle the remapping?

  • 1
    How are you using the font? "Directly" with fontspec? Or do you have a tfm-file and an entry in a map-file? – Ulrike Fischer Dec 22 '10 at 13:16
  • I'm using it using fontspec. – Mayer Goldberg Dec 22 '10 at 14:37
  • 2
    IANAL, but being copyrighted does not mean you are not allowed to modify it. – TH. Dec 22 '10 at 19:44

If the font has bad names for the glyphs and no or almost no built-in ligatures (as I suspect) then there is not much that any automated process can do with it.

In luatex, it would be possible to patch the font during load time by using lua code, or in xetex, pdftex and luatex by turning it into a virtual font using fontinst and the afmtotfm/tftopl/vptovf/ tools, thereby converting it into a traditional 8-bit font. But both approaches require a high level of expertise, much more than can be explained in a reply here.

If the font is just for your use (and not for redistribution) then just fix it in fontforge. Copyright does not disallow that, as long as you do not redistribute, even though the font vendors prefer to make you believe otherwise.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.