* Re: XeTeX font feature selection
2009-03-14 14:33 XeTeX font feature selection John Hughes
@ 2009-03-15 8:58 ` Mojca Miklavec
0 siblings, 0 replies; 2+ messages in thread
From: Mojca Miklavec @ 2009-03-15 8:58 UTC (permalink / raw)
To: mailing list for ConTeXt users
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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 2+ messages in thread