[dev-context] feature interiance

Taco Hoekwater taco at elvenkind.com
Thu Aug 28 11:48:26 CEST 2008


Hans Hagen wrote:
> Taco Hoekwater wrote:
>> Hi Wolfgang, Hans,
>>
>> Wolfgang Schuster wrote:
>>> \definefontfeature[latin-default]  [default]
>>> [script=latn,expansion=quality,protrusion=pure]
>>> \definefontfeature[latin-smallcaps][smallcaps][script=latn,expansion=quality,protrusion=pure] 
>>>
>>> \definefontfeature[latin-oldstyle] [oldstyle]
>>> [script=latn,expansion=quality,protrusion=pure]
>>
>> It seems life would be easier if we would have a way to push
>> merged feature settings downward, something like this:
>>
>>    \definefontfeature
>>      [plushz] % no inheritance, on purpose !
>>      [expansion=quality]
>>    \definetypeface [][][][][][extrafeatures=plushz]
>>
>> That would then be functionally equivalent to
>>
>>    \definefontfeature
>>      [plushz] % no inheritance, on purpose !
>>      [expansion=quality]
>>    \definefontfeature
>>      [<xxx>]
>>      [plushz]
>>    \definetypeface [][][][][]
>>
>> for any <xxx> that is set up by the \definefontsynonyms.
> 
> features={a,b,c,d}

But that doesnt help unless it happens automaticallly. Somewhere down
in the typescript there is a:

   \definefontsynonym [SansCaps] [Sans] [features=smallcaps]

and currently to have expansion added to that font you have to redefine
the font synonyms one way or another, either via

   \definefontfeature[hz-smallcaps][smallcaps][expansion=quality]
   ...
   \definefontsynonym [SansCaps] [Sans] [features=hz-smallcaps]

or via

   \definefontfeature[plushz][expansion=quality]
   ...
   \definefontsynonym [SansCaps] [Sans] [features={smallcaps,plushz}]

but in both cases quite a lot of lines have to be redone.


If MKIV would allow

    \definetypeface [][][][][][extrafeatures=plushz]

so that the font synonym would then automatically be interpreted as

   \definefontsynonym [SansCaps] [Sans] [features={smallcaps,plushz}]

that would be useful (i think so, at least)

Best wishes,
Taco








More information about the dev-context mailing list