[XeTeX] fontspec: mapping=tex-text for the lmodern fonts

Ulrike Fischer news2 at nililand.de
Fri Feb 22 12:44:59 CET 2008


Am Fri, 22 Feb 2008 09:59:13 +0100 schrieb Ulrike Fischer:


> But the question is a more general one: NFSS is open. If I find a font
> with a variant with dotted chars, I can add a font shape "dot" with
> \DeclareFontShape {<ENC>}{<FAM>}{m}{dot}....
> 
> This also works fine with XeLaTeX if I use one (or more than one)
> specific font after the size prefix(es) <->:
> 
> \DeclareFontShape {U}{LatinModernRoman(0)}{m}{myshape}
> {<->"LMRomanSlant10-Regular"}{}
> 
> But how can I use the optical size feature? By looking a how fontspec
> works I had the impression that it use declarations of the form
> 
> \DeclareFontShape {U}{LatinModernRoman(0)}{m}{sl} {<->"Latin Modern
> Roman/ICU:"}{} 
> 
> But this doesn't work e.g. with \Huge. So I'm missing something.

OK. I got it. The problem was the spaces in the font family name. They
were eaten. If I use \space or store the name in command everything
works fine:

\documentclass{scrartcl}
\usepackage[cm-default]{fontspec}
\setmainfont{Latin Modern Roman}
\DeclareFontShape {U}{LatinModernRoman(0)}{m}{sl} {<->"Latin\space
Modern\space Roman\space Slanted"}{}

\def\myfont{Latin Modern Roman Slanted}
\DeclareFontShape {U}{LatinModernRoman(0)}{m}{sl} {<->"\myfont"}{}

\pagestyle{empty}
\begin{document}
\slshape abc \large  abc \Huge  abc \tiny  abc
\end{document}

-- 
Ulrike Fischer 



More information about the XeTeX mailing list