[XeTeX] suppressing common ligatures and kerning

Jonathan Kew jonathan_kew at sil.org
Tue Jul 25 16:51:24 CEST 2006


On 25 Jul 2006, at 2:55 pm, Florian Grammel wrote:

> In LaTeX the command \/ suppresses common ligatures, e.g.. in
> composites like germ. Auf\/lauf.
>
> Doing so in XeLaTeX gives me way too big space between f and l -- I
> supposed, that this is because the space added is specific to the CM-
> fonts.

No, it's not specific to the CM fonts. \/ adds the "italic  
correction", which is specified in the (font-specific) TFM file for  
TeX fonts, so it's something the font designer has provided. For  
OpenType fonts, there is no TFM and no italic correction value, so  
xetex attempts to compute one by looking at the shapes of the glyphs.  
In many cases, this does a pretty good job, but I can imagine that  
there may be cases that don't work well. What font are you using-- is  
it one I can try, or something proprietary? It may be that I can  
improve xetex's approach, but it would be helpful to see the actual  
example in order to better understand what's happening.

> The fontspec-documentation suggests putting a zero-width kern in
> between, which also works fine, apart from the fact that f and l now
> overlap each other.

...which is, of course, why fonts typically provide a ligature for  
this combination.

> Adding an fl-kerning-pair to the font seems the
> right thing to do to me

...but even if you did, you'd still have to disable the ligature. And  
if you do so by inserting something that interrupts the character  
stream (e.g., an explicit kern command such as \kern0pt or \/), then  
any kerning built into the font won't be applied to that glyph pair.

So I'm not sure what the best approach would be.........

JK

> -- but how would I redefine the \/-command to  
> work with this?
>
> I'm looking for a way to let
> x\/y
> stand for
> \addfontfeature{Ligatures=NoCommon}xy\addfontfeature{Ligatures=Common}
>
> Could any of you give me a hint?
>
>
> Or would there be another -- more elegant? -- solution to produce the
> right spacing?
>
> Thanks in advance,
> Florian.
>
> _______________________________________________
> XeTeX mailing list
> postmaster at tug.org
> http://tug.org/mailman/listinfo/xetex



More information about the XeTeX mailing list