10

I try to get microtype's tracking working but without success: up-to-date TeXlive 2011 (lualatex 0.70.1) with microtype v2.5 beta 07. Sample code:

\documentclass{article}
\usepackage[no-math]{fontspec}
\usepackage[tracking,letterspace=500]{microtype}
\begin{document}\parindent0em

\fontspec[SmallCapsFont={Latin Modern Roman Caps}]{Latin Modern Roman}
\textsc{stealing sheep}

\fontspec{Linux Libertine O}
\textsc{stealing sheep}
\end{document}

Latin Modern works fine (letterspaced small caps) but not Libertine (letterspaced lowercase letters). The only difference between both fonts is that Latin Modern has small caps in a separate file. Any ideas how I could get the same working for Libertine? The following does not work, however:

\fontspec[SmallCapsFont={Linux Libertine O}]{Linux Libertine O}

Nor does:

\fontspec[SmallCapsFont={Linux Libertine O},SmallCapsFeatures={Letters=SmallCaps}]{Linux Libertine O}

Any suggestions are very welcome.

Edit: the following does work (with side effects, see below):

\fontspec[Renderer=Basic]{Linux Libertine O}

2nd edit: See related question.

felixvictor
  • 103
  • 1
  • 8

2 Answers2

8
\documentclass{article}
\usepackage[no-math]{fontspec}
\fontspec[SmallCapsFont={LinLibertineCapitalsO},
          SmallCapsFeatures={Letters=SmallCaps}]{Linux Libertine O}
\usepackage[tracking,letterspace=500]{microtype}
\begin{document}\parindent0em

stealing sheap

\textsc{Stealing Sheep}

\textls[800]{\scshape Stealing Sheep}

\end{document}

enter image description here

  • Thanks for the answer, Herbert. However, I do not have a font 'LinLibertineCapitalsO' (separate fonts with small caps) but rather 'Linux Libertine O' including small caps (opentype 'smcp' feature, font stored in texlive/2011/texmf-dist/fonts/opentype/public/libertine/fxlr.otf). I think, I have got a regular TeXlive2011 distribution. – felixvictor Sep 05 '11 at 16:38
  • While reading Raphink's comment above: Just to confirm that I would like the tracking function working with opentype fonts. – felixvictor Sep 05 '11 at 16:46
  • then use the name Linux Libertine C. I do not use the open type fonts from TeXLive, I have the ones from sourceforge installed –  Sep 05 '11 at 17:34
  • Sourceforge does provide a font 'LinLibertineCapitalsO'. Still, this is not what I am looking for. I would like to use the small caps feature of an opentype font. I used Libertine in the sample code as it is a public font for anybody to test. But in my 'real-life' text I would like to use GaramondPremierPro, for example. It does not provide a separate small caps font file but rather the smcp feature. – felixvictor Sep 05 '11 at 19:08
  • what do you think what kind of font I used?? It is the OpenType one ... –  Sep 05 '11 at 19:11
  • Sorry but it seems that I'm not able to make myself understood. Your solution is to use a separate font file (by 'SmallCapsFont=LinLibertineCapitalsO'). In this font, the lowercase characters are replaced by their small caps representation. My question is: how to use an opentype font with regular lowercase characters and additional small caps characters (accessed by feature 'smcp'). Thanks for trying to help me anyway. – felixvictor Sep 05 '11 at 19:18
  • see my editet answer –  Sep 05 '11 at 19:47
  • Hm, the edited answer shows the difference between 500/1000em tracking and 800/1000em letterspacing for 'LinLibertineCapitalsO'. It works if you have got a separate small caps font file. How would it work with, for example, Tex Gyre Heros? Heros does not have a separate small caps file. (Thanks again) – felixvictor Sep 05 '11 at 20:31
  • \fontspec[SmallCapsFeatures={Letters=SmallCaps}]{TeXgyre Heros} –  Sep 05 '11 at 20:35
  • Thanks for the proposal. It does not work for me, as written in my original question. The output contains letterspaced non-smallcaps characters. (If \fontspec is in the praemble, I only get the LatinModern font). Thanks for trying. – felixvictor Sep 05 '11 at 21:16
5

This is due to a bug (or, if one were more polite: incompatibility) in luatex. I've just reported it on the luatex list.

Edit: ... and I got an answer, persuading me to be more polite, indeed - it's not a bug but microtype's using a legacy command.

The simple solution is: load the fonts with Renderer=Basic (side effects are yet to be discovered).

Robert
  • 14,181
  • 1
  • 52
  • 77
  • Thanks, Robert. I hope they can find the time to fix it. – felixvictor Sep 06 '11 at 08:22
  • 3
    I found two side effects of Renderer=Basic sofar: TeX ligatures and letterspaced small caps italics do not work. – felixvictor Sep 07 '11 at 08:40
  • To note a further side effect, spacing of numbers is incorrect. It looks like proportional numbers revert to monospaced. – D.S. Mar 19 '13 at 13:43
  • 1
    I can extent the proportional number side effect. If I don't specify Renderer=Basic the body of my text is all good with Numbers={Oldstyle, Proportional} but inside any \textls and \lsstyle commands numbers change to proportional lining numbers. If I do specify Renderer=Basic then all numbers in the document are set lining and proportional. If I remove the Proportional option when loading my typeface then everything works but all numbers are typeset monospaced. – tmgriffiths Sep 09 '15 at 02:48