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.
Asked
Active
Viewed 992 times
2
Toothrot
- 3,346
1 Answers
6
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!
Henri Menke
- 109,596

factive to behave automatically in the way desired. But activefwould break any macro invocation containing anfand possibly other things, too. If this idea is appealing, I would create\kernfONand\kernfOFFto makefactive 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. – Steven B. Segletes Oct 15 '15 at 16:41