Re: [NTG-context] OpenType features in XeTeX (Was: Some update woes on Linux)
On Nov 10, 2007 9:23 PM, Mojca Miklavec
You can say (features=default is optional) \definefontsynonym[SomeFont][name:Font Name][features=default] which means that XeTeX will call the font \font\somefont="FontName;mapping=tex-text,..." (tex-text is implied by features=default)
Is [features=default] the place where we can access OpenType features? Let's say I have an OpenType font with several number styles (regular, proportional, etc.). Is it possible to use them? I've always wanted to ask this and be sure. Now seems the good time. :-) Thanks, Jeff
On Nov 12, 2007 4:12 PM, Jeff Smith wrote:
On Nov 10, 2007 9:23 PM, Mojca Miklavec wrote:
You can say (features=default is optional) \definefontsynonym[SomeFont][name:Font Name][features=default] which means that XeTeX will call the font \font\somefont="FontName;mapping=tex-text,..." (tex-text is implied by features=default)
Is [features=default] the place where we can access OpenType features? Let's say I have an OpenType font with several number styles (regular, proportional, etc.). Is it possible to use them? I've always wanted to ask this and be sure. Now seems the good time. :-)
I've sent this example to the mailing list once, so let's assume that it still works :) slant= and extend= are some features that are specific to XeTeX, not to OpenType fonts themselves, but other features should in the same way, I guess. I need to check once more, but one or more of the features in the first line map to "mapping=tex-text", onum=yes maps to +onum etc. However, I don't know if there's a quick hack to say [features={default,slant=0.25}] or something equal (thus applying only some features on top of an already existing set). \definefontfeature [slantedandextended] % cloned from "default", not all of them are really needed, if any at all [method=node,script=latn,language=dflt,liga=yes,onum=yes,kern=yes, slant=0.25,extend=1.5] \definefontsynonym [myfont] [file:texgyrepagella-regular][features=slantedandextended] \starttext \definedfont[myfont] This is slanted and extended \stoptext Mojca
2007/11/12, Jeff Smith
On Nov 10, 2007 9:23 PM, Mojca Miklavec
wrote: You can say (features=default is optional) \definefontsynonym[SomeFont][name:Font Name][features=default] which means that XeTeX will call the font \font\somefont="FontName;mapping=tex-text,..." (tex-text is implied by features=default)
Is [features=default] the place where we can access OpenType features? Let's say I have an OpenType font with several number styles (regular, proportional, etc.). Is it possible to use them? I've always wanted to ask this and be sure. Now seems the good time. :-)
You can define your own features sets with \definefontfeature and use this set later with "features=my feature set", "default" is only one of ConTeXt's predefined feature sets but you define your own with every option you need. A definition looks like: \definefontfeature [my features] [a list of OpenType features] You can enable features in the list with "feature=yes" and diable it with "feature=no". ConTeXt's three predefined features sets are - default (ligaures and kerning, plus tex-text in XeTeX) - smallcaps (default plus smallcaps) - oldstyle (default plus oldstyle numerals) Wolfgang
On Nov 12, 2007 11:00 AM, Wolfgang Schuster
Is [features=default] the place where we can access OpenType features? Let's say I have an OpenType font with several number styles (regular, proportional, etc.). Is it possible to use them? I've always wanted to ask this and be sure. Now seems the good time. :-)
You can define your own features sets with \definefontfeature and use this set later with "features=my feature set", "default" is only one of ConTeXt's predefined feature sets but you define your own with every option you need.
Thank you VERY much Mojca and Wolfgang! With XeTeX now I can use the oldstyle numerals with my system-installed OpenType fonts. :-) I'm very, very happy with that. I really thought I had to wait for LuaTeX for that. Now, to push the features topic further on, before experimenting a bit I'd like to ask... does XeTeX support *all* OTF features? Well, I don't want to use all of them, but some more included with my font, and while I'm pretty sure it supports 'pnum', as it supports 'onum', I would also use the built-in superscript ('sups') and subscript ('subs') numerals. Thanks again! Jeff
2007/11/13, Jeff Smith
On Nov 12, 2007 11:00 AM, Wolfgang Schuster
wrote: Is [features=default] the place where we can access OpenType features? Let's say I have an OpenType font with several number styles (regular, proportional, etc.). Is it possible to use them? I've always wanted to ask this and be sure. Now seems the good time. :-)
You can define your own features sets with \definefontfeature and use this set later with "features=my feature set", "default" is only one of ConTeXt's predefined feature sets but you define your own with every option you need.
Thank you VERY much Mojca and Wolfgang! With XeTeX now I can use the oldstyle numerals with my system-installed OpenType fonts. :-) I'm very, very happy with that. I really thought I had to wait for LuaTeX for that.
Now, to push the features topic further on, before experimenting a bit I'd like to ask... does XeTeX support *all* OTF features? Well, I don't want to use all of them, but some more included with my font, and while I'm pretty sure it supports 'pnum', as it supports 'onum', I would also use the built-in superscript ('sups') and subscript ('subs') numerals.
I think this is true for XeTeX, but LuaTeX needs a little bit more time to allow us to use all OpenType features in font (because this is controlled by lua scripts). Wolfgang
participants (3)
-
Jeff Smith
-
Mojca Miklavec
-
Wolfgang Schuster