13.07.2013 Views

Hagen - Pragma ADE

Hagen - Pragma ADE

Hagen - Pragma ADE

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

56<br />

Features<br />

of all, all we get to see is a Lua table, and in ConT E Xt even that one gets sanitized and<br />

optimized into a more useable table. However, as the data that comes with a font is a<br />

good indication of what a font is capable of, we will discuss some of it in an appendix.<br />

In this section we will discuss the basic principles and categories of features.<br />

5.2.2 Feature sets<br />

Because in the next examples we will demonstrate features, we need to know how we<br />

can tell ConT E Xt what features to use. Although you can add explicit feature definitions<br />

to a font specification, I strongly advice you not to do this but use the more abstract<br />

mechanism of feature sets. These are defined as follows:<br />

\definefontfeature<br />

[MyFeatureSet]<br />

[alpha=yes,<br />

beta=no,<br />

gamma=123]<br />

Such a set is bound to a font with the * specifier, as in:<br />

\definefont<br />

[MyFontInstance]<br />

[MyNiceFont*MyFeatureSet at 12pt]<br />

In most cases the already defined default feature set will suffice. It often makes sense<br />

to use that one as base for new definitions:<br />

\definefontfeature<br />

[MyFeatureSet]<br />

[default]<br />

[alpha=yes,<br />

beta=no,<br />

gamma=123]<br />

The second argument can be a list, as in:<br />

\definefontfeature<br />

[MyFeatureSet]<br />

[MyFirstSet,MySecondSet]<br />

[alpha=yes,<br />

beta=no,<br />

gamma=123]<br />

Of course you need to know what features a font support, and one way to find out is:<br />

mtxrun --script font --list --info --pattern=pagella

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

Saved successfully!

Ooh no, something went wrong!