[XeTeX] OldStyle Numbers not changeable to Lining Numbers

Will Robertson wspr81 at gmail.com
Wed Aug 18 07:18:50 CEST 2010


On 2010-08-17 08:23:15 +0930, Tobias Schoel 
<liesdiedatei at googlemail.com> said:

> \defaultfeatures{Numbers=OldStyle} gives medieval numbers,
> \addfontfeature{Numbers=Lining} afterwards keeps medieval numbers.
> 
> Minimal Example:
> 
> \documentclass{article}
> \usepackage{fontspec}
> \defaultfontfeatures{Numbers={OldStyle}}
> \setmainfont[Mapping=tex-text]{Linux Libertine O}
> \begin{document}
> A0123456789
> 
> \addfontfeatures{Numbers={Lining}}A0123456789
> \end{document}

"Mixing" conflicting font features like this is not very reliable in 
fontspec, because after saying Numbers=Lining, fontspec is not smart 
enough to deactivate Numbers=OldStyle. (Unfortunately. Work is planned, 
theoretically, to fix this problem.)

So you end up with the font having to make the decision about what to 
do with BOTH features active at the same time. Which is all a little 
frustrating, since fontspec is supposed to be making things easier to 
use, but oh well.

On a related note...

On 2010-08-17 16:31:35 +0930, "M. Niedermair" 
<m_g_n at gmx.de> said:

> \newfontfamily\libertineX[Mapping=tex-text,
>                            RawFeature=+liga% ;+pnum
>                           ]{Linux Libertine O}
> ...
> You can change the rawfeature as you like.
> smcp, frac, hlig, dlig, lnum, pnum, zero, ...

While there's nothing wrong with this, I'll just point out that these 
are all equivalent to fontspec features such as Ligatures=Common, 
Numbers=Lining, and so on.

There's no error checking on the raw features (yet), which is the main 
reason I recommend using the fontspec features, but I also find the 
OpenType features harder to remember. Whichever you're more comfortable 
with, though.

W




More information about the XeTeX mailing list