In my documents I prefer text in small- and all-caps to be letter spaced. To that end I am using the letterspacing capabilities of the microtype
package. Until now (with version 2.5 of microtype
) I used to get the exact same result when the text was typeset in the same font via the pdflatex
and lualatex
engine, but after the update to latest version of microtype
(2.6) I noticed that while the tracking between characters is the same in both engines, the interword space is not adjusted when the document is run with lualatex
, giving a less readable and pleasing result, especially in all-caps text. I have tested many fonts that I have available in both opentype and type1 format and the behaviour is consistent. The problem is illustrated in the following images (using the freely available libertine font):
An MWE is provided as well:
\documentclass[12pt,crop]{standalone}
\usepackage{ifluatex}
\ifluatex
\usepackage{luatex85}
\else
\usepackage[utf8]{inputenc}
\fi
\usepackage{libertine}
\usepackage{letterspace}
%\usepackage{microtype}
\usepackage{textcase}
\def\allcapsspacing{}
\def\smallcapsspacing{}
\renewcommand{\allcapsspacing}[1]{\textls*[150]{#1}}
\renewcommand{\smallcapsspacing}[1]{\textls*[50]{#1}}
\newcommand{\allcaps}[1]{\allcapsspacing{\MakeTextUppercase{#1}}}
\newcommand{\smallcaps}[1]{\smallcapsspacing{\scshape\MakeTextLowercase{#1}}}
\begin{document}
Stop \smallcaps{Stealing Sheep} Stop \allcaps{Stealing Sheep}\par
\end{document}
Does anybody have an idea why it happens and/or how I could get a similarly adjusted interword space, while not having to adjust it manually (via \spaceskip
) or to rely on fontspec
's \LetterSpace
command? Possibly related: this post and this post
letterspace
and thetextcase
packages, and tuning themicrotype
options, but with no avail. My hunch is that different fonts are being loading in each case. Usingpdffonts
(frompoppler
), in the PDFLaTeX case, I find that the "TKDTHA+LinLibertineT (Type 1)" font is being loaded; in the LuaLaTeX case, I get two fonts: "VLTBVA+LinLibertineO CID Type 0C Identity-H" and "PHHVVI+LinLibertineO CID Type 0C Identity-H".luaotfload
and the way letterspacing is implemented there. Unfortunately, my lua skills are limited to be able to elaborate on that :-(