[NTG-context] ntg-context Digest, Vol 69, Issue 95

Hans Hagen pragma at wxs.nl
Thu Mar 18 14:29:23 CET 2010


On 18-3-2010 12:00, Michael Saunders wrote:
> Wolfgang Schuster:
>
>> \setupbodyfont[pagella]
>>
>> \definefontfeature[smcp][smcp=yes]
>> \definefontfeature[frac][frac=yes]
>>
>> \setuphead[chapter][textstyle=\addfs{frac}\addfs{smcp}]
> ....
>
> This is just an example, but what I think you mean to say by it is
> that the new command \addfs{} has the behavior I describe, but only
> for otf features and not for things like switching to semibold or to
> condensed (and, presumably, even if I'm able to define my own commands
> for things like semibold, something like:
> \sb ABC \it DEF
> would set the DEF at regular weight).
>
> Since I've never seen anyone talk about \addfs{}, but only give
> examples, I'm guessing (but just guessing) that there exists somewhere
> a list of what otf features are active at any given point, and that
> this command can add to that list.  That's great.  I might not need it
> anytime soon, but I'm just curious---are there other commands of this
> kind?  Maybe something to clear the list?

this mechanism is one of the spin off's of the oriental tex project 
(where we play font fonts that have 50+ stylistic variants and 20+ 
justification variants)

\addfontfeaturetoset        {..} % merge
\subtractfontfeaturefromset {..} % merge
\addfontfeaturetofont       {..} % overload
\subtractfontfeaturefromfont{..} % overload

\let\addfs\addfontfeaturetoset
\let\subfs\subtractfontfeaturefromset
\let\addff\addfontfeaturetofont
\let\subff\subtractfontfeaturefromfont

there's also \setfontfeature and \setff

in principle you can also use this to let fonts adapt to a language / 
script and in due time i'll add it as automatism there

(internally in mkiv this is what we call dynamic features)

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------


More information about the ntg-context mailing list