[XeTeX] List of ligatures in a font

Jonathan Kew jfkthame at googlemail.com
Thu Mar 15 14:47:23 CET 2012


On 15 Mar 2012, at 12:34, Philip TAYLOR wrote:

> Zdenek Wagner wrote:
> 
>> 2012/3/14 Peter Dyballa<Peter_Dyballa at web.de>:
> 
>>> Check the code points in the font! The statement
>>> 
>>>        \defaultfontfeatures{Mapping=tex-text}
>>> 
>>> informs the XeTeX engine to use the standard ligatures, as TeX would do by default.
>>> 
>> This mapping instruct XeTeX to use the TECkit mechanism to replace
>> characters by ligatures in case they are not defined by GSUB tables in
>> the font. It does not say anything about ligatures already present in
>> the font nor does it list the contents of the GSUB tables.
> 
> Unfortunately, on a freshly-installed TeX Live 2011 with all
> current updates applied, the control sequence is unknown :
> 
> %!TeX Program=XeTeX
> \magnification 4000
> 
> \defaultfontfeatures {Mapping=tex-text}
> 
> ->
> 
> This is XeTeX, Version 3.1415926-2.3-0.9997.5 (Web2C 2011)
> restricted \write18 enabled.
> entering extended mode
> (./Whitehurst.tex
> ! Undefined control sequence.
> l.4 \defaultfontfeatures
>                        {Mapping=tex-text}
> ?
> 
> Could an expert advise, please ?
> Philip Taylor

\defaultfontfeatures, as others have pointed out, is a fontspec (xelatex) command.

If you want to use the mapping (to convert "--" to en-dash, "``" to double-open-quote, etc) in plain xetex, you can specify it directly when loading fonts, as in

    \font\myromanfont = "Times New Roman:mapping=tex-text" at 11pt

(or wrap this up in whatever custom TeX macros you may be using for font loading).

JK




More information about the XeTeX mailing list