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

Ulrike Fischer news2 at nililand.de
Fri Feb 22 09:59:13 CET 2008


Am Fri, 22 Feb 2008 15:23:10 +1030 schrieb Will Robertson:


>> Do you have an idea how one could declare the sl font shape while
>> retaining the ability to switch automatically between the optical  
>> size?

 
> fontspec doesn't support both the idea of separate italic and slanted  
> shapes because I think it's stupid :) Just because a font family might  
> have them doesn't mean you'd want to use them at the same time.

But the default setup of fontspec for the lmodern font *does* support
\itshape and \slshape. That is what triggered my question: Mojca's
remark that one looses the declaration for the shape sl if one drops all
this euenc-files and declares the lmodern fonts through the standard
commands of fontenc. 

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. 
 

-- 
Ulrike Fischer 



More information about the XeTeX mailing list