1,959 bytes added
, 14:51, 28 November 2012
{{Reference
|name=definefontfeature
|attributes=
}}
== [[Help:Reference|Syntax]] ==
<table cellspacing="4" cellpadding="2" class="cmd">
<tr>
<td colspan="2" class="cmd">\definefontfeature<!--
--><span class="first">[..]</span><!--
--><span class="third">[]</span><!--
--></td>
<tr>
<td colspan="2" class="cmd">\definefontfeature<!--
--><span class="first">[...]</span><!--
--><span class="second">[...]</span><!--
--><span class="third">[...=...]</span><!--
--></td>
</tr>
<tr valign="top" class="first">
<td class="cmd">[...]</td>
<td>''name of new featureset''</td>
</tr>
<tr valign="top" class="second">
<td class="cmd">[...]</td>
<td>''name of featureset to inherit from''</td>
</tr>
<tr valign="top" class="third">
<td class="cmd">[...=...]</td>
<td>''feature''=yes,''feature''=no,...</td>
</tr>
</table>
== Description ==
Define a font feature set as a collection of OTF font features turned on or off. A font feature set can be activated with {{cmd|setff}} or {{cmd|addff}}. To modify an existing font feature set, use {{cmd|definefontfeature|[myset][myset][onum=no,...]}}; that way, the OTF features you (in)activate are added to the ones already in the set.
== Example ==
Add {{code|1=onum=yes}} to the default feature set:
<context mode=mkiv source=yes>
\definefontfeature[default][default][onum=yes]
\setupbodyfont[schola,8pt]
\starttext
1234567890
\stoptext
</context>
Make a new feature set that sets {{code|1=onum=yes}}, and activate it next to the active set with {{cmd|addff}}:
<context mode=mkiv source=yes>
\setupbodyfont[schola,8pt]
\definefontfeature[oldstyle][onum=yes]
\starttext
1234567890 {\addff{oldstyle}1234567890}
\stoptext
</context>
== See also ==
* {{cmd|setff}}
* {{cmd|addff}}
* {{cmd|definefontfeature}}
== Help from ConTeXt-Mailinglist/Forum ==
All issues with:
{{Forum|definefontfeature}}
[[Category:Commands|definefontfeature]]