# Cabin font doesn't render properly apostrophe

I'm using Cabin font with XeLaTeX. The apostrophe is not render properly.

As you can see on the following screenshot, there is not enough space betweend L and a.

On this screenshot (with the default LaTeX font), there is no problem:

Is it possible to fix this?

MWE (use XeLaTeX):

\documentclass[12pt]{article}
\usepackage{fontspec}
\setmainfont{Cabin}
\begin{document}
L'apostrophe
\end{document}


It seems that it is very tightly spaced to following lowercase letters (1). You can prevent the kerning with \mbox (2). I assume a word space is too much (3) or you could use the xetex inter-character token class to add an extra kern, here I set up a class for ' and a class for lower case ascii letters and inject a small kern if ' is followed immediately by a letter.

\documentclass[12pt]{article}
\usepackage{fontspec}
\setmainfont{Cabin}

\begin{document}
L'apostrophe

L\mbox{'}apostrophe

L' apostrophe

\XeTeXinterchartokenstate=1
\newXeTeXintercharclass\aposclass
\newXeTeXintercharclass\letterclass
\XeTeXcharclass\'=\aposclass
\count0=a
\loop
\XeTeXcharclass\count0=\letterclass
\ifnum\count0<z
\repeat
\count0=1

\XeTeXinterchartoks\aposclass\letterclass{\kern.1em}

L'apostrophe

\end{document}

• Thanks. The solution 3 is interesting. However, there are still little differences between a apostrophe with the normal font and with cabin and your code. For example the ' is too close to the L`. So a font who renders properly French should be prefered. – ppr Jun 15 '15 at 7:48
• @ppr I think it's essentially a bug in the font and the fix was only intended to be font-specific just to be enabled where cabin is being used. – David Carlisle Jun 15 '15 at 8:14