[XeTeX] OT features

Georg A. Duffner g.duffner at gmail.com
Mon Feb 14 22:24:14 CET 2011


For my font project (see www.georgduffner.at/ebgaramond) i have been 
playing around with some opentype features. It seems, that contextual 
features involving the character "space" don’t work as expected. I 
wanted to implement a feature for latin texts that replaces "u" at the 
beginning of a word by a letter that looks like "v". The rule looks like 
this:

     sub [ space @PUNCT ] u.LAT' by u.LATinit;

where @PUNCT is a list of puntuation characters like opening quotes etc. 
In XeTeX, the replacement does work after any of the defined punctuation 
marks, but not after space. Another interesting thing that I observed is 
that for some languages but not all you have to specify the language 
separately with \addfontfeature to make local settings apply (eg. 
german, romanian, latin, but not serbian)

Minimal example:

\documentclass{article}
\usepackage{fontspec}
\usepackage{polyglossia}
\setdefaultlanguage{latin}
\defaultfontfeatures{RawFeature={+calt}}
\setmainfont{EBGaramond}
\begin{document}
\addfontfeature{Language=Latin}
Universalis universalis—universalis „universalis“.
\end{document}

Best regards
Georg


More information about the XeTeX mailing list