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.

80<br />

Features<br />

\setupbodyfont<br />

[mojcasfavourite]<br />

When resolving the definition, the best possible match will be taken from the typeface<br />

table in the goodie file. Of course this is not something that we expect the average user<br />

to deliver and deal with.<br />

As the Antykwa font is somewhat atypical and not used in everyday typesetting, you<br />

might wonder if all this overhead makes sense. However, there are type foundries that<br />

do ship their fonts in many weights and for those using a Lua goodie file instead of many<br />

typescripts in T E X coding makes sense. Take for instance TheMix:<br />

\loadfontgoodies<br />

[themix]<br />

\definetypeface<br />

[name=themix,<br />

preset=themix-light]<br />

\definetypeface<br />

[name=themix,<br />

preset=themixmono-light]<br />

\setupbodyfont<br />

[themix]<br />

In this case the goodie file can serve as a template for more such fonts. In order to be<br />

efficient this goodie file uses a couple of local tables (we could have used metatables<br />

instead).<br />

local themix = {<br />

name = "themix",<br />

shortcut = "ss",<br />

shape = "sans",<br />

fontname = "themix",<br />

width = "normal",<br />

size = "default",<br />

features = "default",<br />

}<br />

local themixmono = {<br />

name = "themixmono",<br />

shortcut = "tt",<br />

shape = "mono",<br />

fontname = "themixmono",<br />

width = "normal",<br />

size = "default",

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

Saved successfully!

Ooh no, something went wrong!