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.

46<br />

Lookups<br />

\font \MyFontG = lmr12 sa 1.2<br />

This method is not part of T E X but is provided by ConT E Xt, MkII as well as MkIV. It means<br />

as much as “scale this font to 1.2 times the bodyfontsize”. As this involves parsing the<br />

specification, it does not work as advertised here, but the next definition works okay:<br />

\definefont[MyFontG][lmr12 sa 1.2]<br />

This indicates that we already had a parser for font specifications on board which in<br />

turn made it relatively easy to do even more parsing, for instance for font features as<br />

introduced in X Ǝ T E X and LuaT E X.<br />

3.2 Specifications<br />

In LuaT E X we intercept the font loader. We do so for several reasons.<br />

• We want to make decisions on what file to load, this is needed when for instance there<br />

are files with the same name but different properties.<br />

• We want to be able to lookup by file, by name, and by more abstract specification. In<br />

doing so, we want to be as tolerant as possible.<br />

• We want to support several scaling methods, as discussed in the previous section.<br />

• We want to implement several strategies for passing features and defining non standard<br />

approaches.<br />

The formal specification of a font is as follows:<br />

\definefont[PublicReference][filename]<br />

\definefont[PublicReference][filename at dimension]<br />

\definefont[PublicReference][filename scaled number]<br />

We already had that extended to:<br />

\definefont[PublicReference][filename]<br />

\definefont[PublicReference][filename at dimension]<br />

\definefont[PublicReference][filename scaled number]<br />

\definefont[PublicReference][filename sa number]<br />

So let’s generalize that to:<br />

\definefont[PublicReference][filename scaling]<br />

And in MkIV we now have:<br />

\definefont[PublicReference][filename*featurenames scaling]<br />

\definefont[PublicReference][filename:featurespecication scaling]<br />

\definefont[PublicReference][filename@virtualconstructor scaling]

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

Saved successfully!

Ooh no, something went wrong!