13.07.2013 Views

Hagen - Pragma ADE

Hagen - Pragma ADE

Hagen - Pragma ADE

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

are used to fine-tune the typography as happens in the Oriental TEX project, which is<br />

related to LuaTEX. Instead of defining yet another font instance we can therefore enable<br />

and disable specific features. For this it is not needed to know the current font and its<br />

size. 3<br />

Dynamics are a special case of node mode and you don’t need to set it up when<br />

defining a font. In fact, a font defined in base mode can also be dynamic. We show some<br />

simple examples of applying dynamic features.<br />

Let’s first define some feature sets:<br />

\definefontfeature[f:smallcaps][smcp=yes]<br />

\definefontfeature[f:nocaps] [smcp=no]<br />

\definefontfeature[f:oldstyle] [onum=yes]<br />

\definefontfeature[f:newstyle] [onum=no]<br />

We can add and subtract these features from the current feature set that is bound to<br />

the current font.<br />

\switchtobodyfont[pagella] 123 normal<br />

\addfeature {f:oldstyle} 123 oldstyle<br />

\addfeature {f:smallcaps} 123 olstyle smallcaps<br />

\subtractfeature{f:oldstyle} 123 smallcaps<br />

\subtractfeature{f:smallcaps} 123 normal<br />

Here we choose a font that has oldstyle numerals as well as small caps: pagella.<br />

123 normal 123 oldstyle 123 olstyle smallcaps 123 smallcaps 123 normal<br />

The following does the same, but only uses addition:<br />

\switchtobodyfont[pagella] 123 normal<br />

\addfeature{f:oldstyle} 123 oldstyle<br />

\addfeature{f:smallcaps} 123 olstyle smallcaps<br />

\addfeature{f:newstyle} 123 smallcaps<br />

\addfeature{f:nocaps} 123 normal<br />

You can also completely replace a feature set. Of course the set is only forgotten<br />

inside the current group.<br />

\switchtobodyfont[pagella] 123 normal<br />

\addfeature {f:oldstyle} 123 oldstyle<br />

\addfeature {f:smallcaps} 123 olstyle smallcaps<br />

\replacefeature{f:oldstyle} 123 oldstyle<br />

\replacefeature{f:smallcaps} 123 smallcaps<br />

3 Dynamics are a ConTE Xt specific feature and is not available in the generic version of the font code. There are<br />

several reasons for this: it complicates the code, it assumes the ConT E Xt feature definition mechanism to be used,<br />

and it is somewhat slower as some extra analysis has to be done.<br />

41<br />

Modes

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!