# Kerning issue with Adobe Garamond Pro: XeTeX or font file to blame ?

I have run into a strange kerning issue, limited to the German letter pair Wä, when using the Adobe Garamond Pro font with XeTeX. The document looks great except for that particular pair. But see for yourself:

Kerning with XeTeX:

Kerning, with the same font file, with LibreOffice:

I could reproduce the strange same result on different machines both on mac osx and ms windows. I am quite confused about it and I would appreciate if you would share your thoughts on that XeTeX result. Is there a chance to get it work, i.e. without manipulating the kerning for each appearance of Wä manually?

-
How do you input ä and what packages do you use? A MWE would be helpful. – Andrey Vihrov Feb 22 '12 at 21:49
I can confirm it happens with Xe(La)TeX but not with LuaLaTeX. – egreg Feb 22 '12 at 21:57
I had noticed the same with Minion Pro and plain XeTeX. – morbusg Feb 23 '12 at 7:05
And also with Vä (with Minion at least) – morbusg Feb 23 '12 at 7:28
This could be (but I really don't know much about lookups + kernings and how to check them) due to a bug of the ICU-engine just discussed at the mailing list: tug.org/pipermail/xetex/2012-February/022764.html. As an answer Jonathan Kew pointed to bugs.icu-project.org/trac/ticket/7753. – Ulrike Fischer Feb 23 '12 at 8:54

Until the problem is solved, you can use this workaround based on XeTeX character classes (manual):

\documentclass{article}

\usepackage{lmodern}

\XeTeXinterchartokenstate=1

\newXeTeXintercharclass \Wclass
\newXeTeXintercharclass \aeclass

\XeTeXcharclass \W \Wclass
\XeTeXcharclass \ä \aeclass

\XeTeXinterchartoks \Wclass \aeclass = {\kern -3pt}

\begin{document}

Wa Wä

\end{document}


-
Thank you, Andrey! This is a great workaround and works for me as a momentary solution. However, in your example, the -3pt make it worse, so I changed it to -0.5pt in my usage. – swisschris Feb 23 '12 at 8:30
@swisschris: -3pt was just to emphasize the effect. Change it to whatever looks best. – Andrey Vihrov Feb 23 '12 at 8:31

It appears to be a font-specific kerning problem. Below: Calluna, Warnock, Sabon, with XeLateX:

The W + ä overlapping also occurs with Minion and Caslon. I guess you could disable kerning with fontspec, but I don’t know how that could be done for just one pair.

-
Yes, it's definitely a font-specific problem. Thanks a lot for your well-arranged comparison! However, I am still asking myself if this qualifies for a XeLaTeX bug-report. The confusing point for me is that I get the W + ä overlapping with XeLaTeX but not with LibreOffice using the exact same font file. – swisschris Feb 23 '12 at 0:23
@swisschris: Can you try LuaLaTeX and ConTeXt? – Martin Schröder Feb 23 '12 at 7:33
@Martin: No, I can't. According to egregs comment (see above) the W+ä kerning is correct in LuaLaTeX. – swisschris Feb 23 '12 at 8:15