10

I'm switching a code to LuaTex from XeTeX. In XeTeX, I had a combination of tracking and small caps using LetterSpace and WordSpace parameters in fontspec calls, but these are not supported in with LuaTeX.

When using textls with lualatex from TL2011 and microtype v2.5 <beta-06>, small caps are broken. Here is a MWE:

\documentclass{scrbook}                                                         

\usepackage{fontspec}                                                           
\usepackage{xunicode}                                                           
\defaultfontfeatures{Ligatures=TeX}                                             
\setmainfont{Linux Libertine O}                                                 
\newfontfamily\scfont[Letters=SmallCaps]{Linux Libertine O}                     

\usepackage{microtype}                                                          

\begin{document}            

\scshape{Example of small caps}                                                 

\textls{\scshape{Example of small caps with textls}}                            

\scshape{\textls{Example of small caps with textls inside}}                     

{\lsstyle\scshape{Example of small caps with lsstyle}}                          

{\scfont Example of Letters=SmallCaps}                                          

{\scfont\textls{Example of textls with Letters=SmallCaps}}                      

\end{document}         

and the result I get:

examples of sc with textls in luatex

Is there a way to get small caps with tracking in LuaTeX?

9

You have to activate the SmallCaps feature with fontspec

\usepackage{fontspec} 

\usepackage{xunicode}    

\defaultfontfeatures{Ligatures=TeX}

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

\newfontfamily\scfont[Letters=SmallCaps]{Linux Libertine O}                     
    

enter image description here

the name of the font maybe different in your installation:

["familyname"]="Linux Libertine C",
   ["filename"]={ "/usr/share/fonts/truetype/LinLibertine_C-4.0.4.ttf", false },
   ["fontname"]="LinLibertineC",
   ["fullname"]="Linux Libertine Capitals",
    ["family"]="Linux Libertine C",
    ["fullname"]="Linux Libertine Capitals",
    ["psname"]="LinLibertineC",

The font is available for download here: http://comedy.dante.de/~herbert/

  • Linux Libertine C cannot be found: ! Font \EU2/LinuxLibertineO(0)/m/sc/10.95=name:LinuxLibertineC:mode=node;script =latn;language=DFLT;+tlig;+trep;+smcp; at 10.95pt not loadable: metric data not found or bad. – ℝaphink Aug 19 '11 at 21:27
  • see my edit. Maybe your names are different – user2478 Aug 19 '11 at 21:32
  • Ok, I had to use the psname for the OTF font, so LinLibertineCapitalsO. Thank you very much. How come this has to be done? – ℝaphink Aug 19 '11 at 21:36
  • @Herbert : two questions: 1. I cannot find a Linux Libertine C anywhere on the internet. Where can I get it? I downloaded the most recent otf and ttf files (version 5.3.0), but there was no SmallCaps font in it. 2. So, I had to try your approach with other fonts, without success. Does your approach still work? – ClintEastwood Apr 7 '14 at 18:32
  • see comedy.dante.de/~herbert – user2478 Apr 7 '14 at 18:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.