+ /* Fontspec (XeTeX, LuaTeX): we provide GUI support for oldstyle
+ * numbers (Numbers=OldStyle) and sf/tt scaling. The Ligatures=TeX/
+ * Mapping=tex-text option assures TeX ligatures (such as "--")
+ * are resolved. Note that tt does not use these ligatures.
+ * TODO:
+ * -- add more GUI options?
+ * -- add more fonts (fonts for other scripts)
+ * -- if there's a way to find out if a font really supports
+ * OldStyle, enable/disable the widget accordingly.
+ */
+ if (use_systemfonts && features.isAvailable("fontspec")) {
+ // "Mapping=tex-text" and "Ligatures=TeX" are equivalent.
+ // However, until v.2 (2010/07/11) fontspec only knew
+ // Mapping=tex-text (for XeTeX only); then "Ligatures=TeX"
+ // was introduced for both XeTeX and LuaTeX (LuaTeX
+ // didn't understand "Mapping=tex-text", while XeTeX
+ // understood both. With most recent versions, both
+ // variants are understood by both engines. However,
+ // we want to provide support for at least TeXLive 2009.
+ string const texmapping =
+ (features.runparams().flavor == OutputParams::XETEX) ?
+ "Mapping=tex-text" : "Ligatures=TeX";