What is the correct way of selecting a font and using OpenType features? I have tried \definetypeface[linlib][rm][Xserif][Linux Libertine][features=oldstyle] \setupbodyfont[linlib, 12pt] but the output prints Computer Modern (and not with old-style numerals). The font seems to work without the "features=oldstyle", but I am not sure how to select the font and some OpenType features. I don't seem to be able to find any documentation. John
On Sat, Mar 14, 2009 at 15:33, John Hughes wrote:
What is the correct way of selecting a font and using OpenType features? I have tried
\definetypeface[linlib][rm][Xserif][Linux Libertine][features=oldstyle] \setupbodyfont[linlib, 12pt]
but the output prints Computer Modern (and not with old-style numerals). The font seems to work without the "features=oldstyle", but I am not sure how to select the font and some OpenType features. I don't seem to be able to find any documentation.
Hello, the only documentation is type-xtx.tex source code. The Xserif hack that has originally been written by Adam Lindsey now reads as: \starttypescript[Xserif][all][name] \definefontsynonym[Dummy] [name:\typescripttwo] [features=default] \definefontsynonym[Serif] [Dummy] This means that [features=default] is hardcoded into the syntax. I didn't try it, but to make something work the way you would like it, one would need to modify the hack into something like this: \definefontsynonym[Dummy] [name:\typescripttwo] [\typescriptthree] (but this would need some thinking, I do not suggest doing this modification right away even if it works). Else you can use "classical" typescripts as those in pdftex and luatex (see type-otf.tex, type-tmf.tex etc.) - numerous examples spread around. A kind-of-dirty, but most simple trick is to just redefine default features:
From font-ini.mkii:
\definefontfeature [default] [liga=yes,kern=yes,tlig=yes,trep=yes] \definefontfeature [oldstyle] [liga=yes,kern=yes,tlig=yes,trep=yes,onum=yes] Just put the following definition on top of your document: \definefontfeature [default] [liga=yes,kern=yes,tlig=yes,trep=yes,onum=yes] Mojca
participants (2)
-
John Hughes
-
Mojca Miklavec