[XeTeX] fontspec and languages

Javier Bezos listas at tex-tipografia.com
Wed Sep 11 16:35:51 CEST 2013


El 11/09/2013 11:24, Ulrike Fischer escribió:

>> The question is: Does fontspec provide a way to set the
>> language so that it's always active even if other default
>> features are changed.
>
> Not that I know (and the code doesn't look as if it does).

Thanks. That was my impression after reading the code, but
I liked to confirm it, because I'm not yet fluent in LaTeX3.

> One could perhaps change the default language DFLT, but this will
> disable the fallback to DFLT for fonts which don't know a language
> and I have some doubts this is a good idea.

Something like that but not the internal default language, but
a default value in \defaulfontfeatures if the key is not given
(ie, "if there is no key 'Language', add 'Language=<current-language>'
to the list").

> and hope that the user
> doesn't use a \defaultfontfeatures afterwards):

An assumption I wouldn't want to do.

> Javier is probably looking for general solutions that work in a
> \selectlanguage command (he is the babel maintainer).

Do you have a crystal ball? :-) Yes, this is exactly what I want
(perhaps I had to make clear this point -- sorry). I've considered
a new macro named, say, \babelfontfeatures to be used as a
replacement of \defaultfonfeatures and based only this "public"
macro.

Another possibility is to redefine an internal macro -- namely,
\fontspec_preparse_features:nN -- which works in my preliminary
tests, but I think fontspec is not stable enough (in fact, this
macro has been rewritten in full in a recent release).

Javier



More information about the XeTeX mailing list