19

I am having a problem with kerning while using LuaLaTeX. In my example, the pair “AT” does not render well. This is clear by comparing LuaLaTeX output with XeLaTeX's, which from the same code renders the pair correctly. In this image, LuaLaTeX output is on the left:

kerning

With small caps the problem seems to appear only when I put them inside an \mbox, as shown in the last line of my example. (Could this be related to hyphenation, perhaps? Words protected from hyphenation are rendered with good kerning.)

I have been trying to pinpoint the source of the problem, but I am clueless. (I am new to LaTeX.)

My system is equipped with TeX Live 2011, just installed with as few packages as I could.

The code used:

\documentclass{article}
\usepackage{fontspec}
\setmainfont{Minion Pro}

\begin{document}

\mbox{}\newline
\huge FOUNDATIONS\newline
\huge \textsc{foundations}\newline
\huge \textsc{\mbox{foundations}}

\end{document}
1
  • 1
    It seems that the problem has something to do with the processing mode in luaotfload. If I select base, the kerning problem gets extended to the second line (with the first one then rendering right). However, explicitly setting node mode (even though it is used by default) does not solve the problem. It appears as if the processing mode were being changed for whatever reason at different points in the document.
    – Pablo
    Jan 15, 2012 at 0:58

1 Answer 1

10

Things like this are very difficult to debug. The problem is that there exists a lot of potential sources for the problem: The engine luatex, the lua code used to load and manipulate the font (here luaotfload based on code from context), the mode used (base or node) and naturally the font.

I can see the different kernings In the following example the kerning between A + T are missing at hyphenation points when mode=node is used. "ATT" is fine, and mode=base too.

\documentclass{article}
\usepackage{luaotfload}
\begin{document}
{\font\test="name:MinionPro:mode=node:+kern" at 20pt \test ATT DATUM FOUNDATIONS}

{\font\test="name:MinionPro:mode=base:+kern" at 20pt \test ATT DATUM FOUNDATIONS}
\end{document}

As the font loader is based on context code I tried also with context. There I didn't get any kerning at all. But this could be due to the fact that I don't know really how to call fonts with low-level commands in context (the documentation of context is very sparse regarding background informations). I think you should ask on the context mailing list if your problems with the kerning are reproducible.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .