[XeTeX] overriding \addfontfeatures
Will Robertson
wspr81 at gmail.com
Wed Jun 4 06:57:11 CEST 2008
On 26/05/2008, at 2:09 PM, Will Robertson wrote:
> On 24/05/2008, at 7:43 AM, Flavio Costa wrote:
>
>> I think \defaultfontfeatures is not the solution, since it is not
>> restricted to a scope like \addfontfeatures is. Is there any
>> elegant way of getting the desired effect?
>
> This does seem like a bug in fontspec; I wonder why it's happening.
> I guess I never tested multiple \addfontfeatures in this way before.
> I'll take a closer look as soon as I can and try and fix this up.
Okay, this is NOT a bug in fontspec.
It might be a bug in the font, or it might be a bug in XeTeX.
Take a look at the following example: (use Minion Pro if you don't
have Warnock Pro)
\documentclass{article}
\begin{document}
\font\1="Warnock Pro:+onum" at 14pt \1 [123]
\font\1="Warnock Pro:+lnum,+onum" at 14pt \1 [123?]
\font\1="Warnock Pro:+lnum" at 14pt \1 [123]
\font\1="Warnock Pro:+onum,+lnum" at 14pt \1 [123]
\end{document}
In the second case, I'd expect the +onum to override the +lnum, but it
doesn't; for some reason the +lnum has precedence. This seems to
happen for a number of Adobe fonts, at the very least.
To fix this problem robustly, I need to add an OpenType interpreter to
fontspec that automatically turns off features that it knows should be
overridden, but this would be a fair bit of work for me right now.
***
On 04/06/2008, at 7:40 AM, Flavio Costa wrote:
> Can I hope to have a solution to this problem anytime soon? If not
> an actual fix in the package, at least a workaround - since this is
> the last detail I have to fix to consider my dissertation finished.
Congratulations :)
As a workaround, I'd suggest using explicit fonts for your tabular
data; something like
\newfontfamily\tabularfont[Numbers={Lining,Monospaced}]{Minion Pro}
\newfontfamily\linecounterfont[Numbers={OldStyle}]{Minion Pro}
And then use those definitions instead of \addfontfeature. It's not as
flexible, but if it's the last detail you have left I think it will
suffice for now ;)
Best wishes,
Will
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2415 bytes
Desc: not available
Url : http://tug.org/pipermail/xetex/attachments/20080604/316b5ecd/attachment.bin
More information about the XeTeX
mailing list