[XeTeX] Use of different input mappings

Will Robertson wspr81 at gmail.com
Sun Mar 16 04:24:40 CET 2008


On Sun, Mar 16, 2008 at 12:04 AM, Daniel Stender <uzstzm at uni-bonn.de> wrote:
>  since the use of a custom input mapping (.tec) is possible like:
>  \newfontinstance\devanagari[Script=Devanagari,%
>  Mapping=velthuis-sanskrit]{foobar}, what would be the usage
>  for switching mappings within the same font like:
>  .... {[Mapping=foo] ...} ... {[Mapping=bar] ...} ... ?

I'm afraid there's currently no way in fontspec to *remove* an applied
feature. This is perhaps a bit of an oversight. You might like just to
try
  \newfontface\foofoo[Mapping=foo]{foobar}
  \newfontface\foobar[Mapping=bar]{foobar}

Otherwise you could define you font without the mapping and use
\addfontfeature{Mapping=foo} when it comes up in the document. This is
marginally less efficient, and arguably harder to write in your
document in the first place.

It does make sense if you're writing a class file, say, where you
don't know what font the user will be using but you do want to change
features for different document elements.

Hope this helps,
Will


More information about the XeTeX mailing list