From: Mojca Miklavec <mojca.miklavec.lists@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: XeTeX font feature selection
Date: Sun, 15 Mar 2009 09:58:30 +0100 [thread overview]
Message-ID: <6faad9f00903150158i76ce7d59ye682520c571f8428@mail.gmail.com> (raw)
In-Reply-To: <e889da2e0903140733j286298fo3316dce0cea783b5@mail.gmail.com>
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
___________________________________________________________________________________
prev parent reply other threads:[~2009-03-15 8:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-14 14:33 John Hughes
2009-03-15 8:58 ` Mojca Miklavec [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6faad9f00903150158i76ce7d59ye682520c571f8428@mail.gmail.com \
--to=mojca.miklavec.lists@gmail.com \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).