# xelatex myriad pro l with apostrophe issue

I compile my document with xelatex. I use Myriad pro

\setmainfont[Mapping=tex-text]{Myriad Pro}


My problem is that the "l'a" is looking OK but not the "l'i" the i touches the apostrophes. Can someone tell me how to fix this issue?

## migrated from stackoverflow.comMay 18 '13 at 11:54

This question came from our site for professional and enthusiast programmers.

• The kerning of the apostrophe in Minion Pro and Myriad Pro is known to be bad. :( – egreg May 18 '13 at 13:33
• in pdfTeX, things like this were possible. Let's hope the kerning feature will be back in microtype for Xe/LuaLaTeX someday. – Nils L May 18 '13 at 13:54
• Please see: tex.stackexchange.com/questions/45460/… – morbusg May 18 '13 at 19:35
• It is an ugly solution, but you could manually add kerning... Defining some macros would make it much easier. Alternatively, you could open the font in Fontforge and change the kerning there. It involves some work but it is doable. I am not really sure if it permitted by the fonts license though... – pmav99 May 18 '13 at 21:37
• @all thanks for your your answers. I have another question. Is there any other font very similar to myriad pro that handles better the appostrophes? – S12000 May 19 '13 at 11:37

## 1 Answer

There is nothing wrong with the font, you can find this out by writing the same thing into another program. It is a issue with ICU engine with XeTeX.

One way to fix it is to issue a zero kern after the apostrophe:

l'\kern0pt inno


Another option would be to use \XeTeXinterchartoks to insert that kern automatically. See this answer on how to do it.

Here's an example as requested:

\documentclass{article}
\usepackage{fontspec}
\setmainfont[Ligatures=TeX]{Myriad Pro}
\XeTeXinterchartokenstate=1
\newXeTeXintercharclass \aposclass
\XeTeXcharclass ' \aposclass
\XeTeXinterchartoks \aposclass 0 = {\kern0pt }
\begin{document}
L'arbre de l'inno
\end{document}
`
• yeah sorry, i did not mean that myriad pro font has issues. I means that xelatex makes issue with myriad pro font... Whatever, your l'\kern0pt solution works fine. However I don't get how to use \XeTeXinterchartoks in my case. I saw the other topic which is related to other letters issue. So can you tell me how to use \XeTeXinterchartoks for my case? Thanks a lot to you ;) – S12000 May 20 '13 at 14:42
• @Swiss12000: Sure, updated to include example. If I've understood correctly, the ICU engine will be replaced in TL2013 so this would not be needed then. – morbusg May 20 '13 at 15:04
• hum good news that they will improve those kind of issue. However, for the moment the code your gave me doesn't give error message when I compile. However the appostrophe + i doesn't change (still sticked togheter...) – S12000 May 20 '13 at 15:18
• @Swiss12000: That's weird. I even tried with Plain-XeTeX (with explicit "/ICU"-switch) and it works for me. What versions are you running? (I tried with TeXLive2012, Myriad Pro version 2.102, OS X 10.8.3.) – morbusg May 20 '13 at 16:12
• I have the latest version of miktex 2.9.4813 with windows 7. – S12000 May 20 '13 at 18:06