[XeTeX] Accessing ligatures from FontForge

David Perry hospes.primus at verizon.net
Wed Feb 23 12:43:56 CET 2011


John,

I don't know if FontForge uses the same syntax as Adobe's FDK (also used 
in FontLab), but I think it might.  Here's how I do <liga> in FontLab. 
(In FL if you don't specify a script and language it applies Latin 
script and the default language, which might be different in FontForge.)

feature liga { # Standard Ligatures
  # Latin
     sub f f i by f_f_i;
     sub f f l by f_f_l;
     sub f i by fi;
     sub f j by f_j;
     sub f l by fl;
     sub f f by f_f;
} liga;

The order of the ligatures is important; by putting the long ones (ffi, 
ffl) before the shorter ones you make sure that the long ones get 
processed correctly.  Ligatures are normally named by putting an 
underscore between the components, but fl and fi are an exception in 
fonts that follow the Adobe naming conventions -- which you are not 
required to do, of course.

There are indeed many fonts out there that have the ligatures in the 
codepoints FB00 - FB04.  You may get better PDF searchability if you 
don't use any Unicode values, though.  But using them will not cause a 
<liga> feature to fail if it is otherwise set up correctly.

David

On 2/23/2011 3:19 AM, John Was wrote:
> Thanks to everyone for the advice.
>
> I don't use XeLaTeX so don't employ commands such as
> \defaultfontfeatures - this isn't how I access fonts in plain XeTeX.
>
> It's obvious (I think!) that I need to learn how to set up a liga table
> in FontForge, and indeed I thought I'd done just that, but it's not
> picking up the information. I'll have another look but since I can
> access the characters by \char" I believe I can see a way forward from
> within TeX (making the five characters active so that they invoke the
> required \discretionary commands to generate correct hyphenation). The
> only down side to that, which is not a great inconvenience, will be
> globally searching on ffi, ffl, etc. to replace them with the Unicode
> characters.
>
> But I hadn't realized that FB00 - FB04 were deplored as the positions
> for these characters, and that may be part of the problem. (However, I
> have examined my Monotype Baskerville outline font, and it does have the
> five ligatures in those slots.)
>
> I'm sure all this is just the usual floundering of a newbie - I
> expect/hope it will all become clear after I've climbed the learning curve.
>
> Best
>
>
> John
>
>
>



More information about the XeTeX mailing list