With the font I am using, the f touches a following closing quotation mark. I am præventing that from happening by periodically replacing all instances of f'
with f\,'
. Is there a better way to do this? I am already using XeTeX character classes for automatic language switching.
1 Answer
As explained in this answer you could use the XeTeX interchar classes to add custom kerning between f
and '
. I didn't find a font where f
and '
touch, but the spacing between f
and '
is fairly tight in Adobe Garamond Pro, and for a word ending in ff
they do touch.
\documentclass{article}
\usepackage{fontspec}
\setmainfont[Ligatures=TeX]{Adobe Garamond Pro}
\newXeTeXintercharclass\charclassf
\newXeTeXintercharclass\charclassprime
\XeTeXcharclass`\f\charclassf
\XeTeXcharclass`\'\charclassprime
\XeTeXinterchartoks\charclassf\charclassprime={\kern.15em}
\begin{document}
`bluff' `surf'
\XeTeXinterchartokenstate=1
`bluff' `surf'
\end{document}
Remark for people using Garamond: While looking for a font where the f
touches the '
(and while previously search for a font where f
and b
touch) I found that EB Garamond has ligatures for all these combinations, which are a pain to kern by hand in other fonts. EB Garamond is great!
f
active to behave automatically in the way desired. But activef
would break any macro invocation containing anf
and possibly other things, too. If this idea is appealing, I would create\kernfON
and\kernfOFF
to makef
active and normal, respectively. Then you could turn it on before a text block, and turn it off afterwards. If you want to see an answer to this effect, please let me know.