7

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?

enter image description here

6
  • 3
    The kerning of the apostrophe in Minion Pro and Myriad Pro is known to be bad. :( Commented May 18, 2013 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. Commented May 18, 2013 at 13:54
  • Please see: tex.stackexchange.com/questions/45460/… Commented May 18, 2013 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... Commented May 18, 2013 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? Commented May 19, 2013 at 11:37

1 Answer 1

4

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

enter image description here

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}
7
  • 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 ;) Commented May 20, 2013 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. Commented May 20, 2013 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...) Commented May 20, 2013 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.) Commented May 20, 2013 at 16:12
  • I have the latest version of miktex 2.9.4813 with windows 7. Commented May 20, 2013 at 18:06

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.