Hagen - Pragma ADE

Hagen - Pragma ADE Hagen - Pragma ADE

context.aanhet.net
from context.aanhet.net More from this publisher
13.07.2013 Views

78 Features \starttypescript[somefontset] \definetypeface [somefontset] [rm] [serif] [someserif] [default] \definetypeface [somefontset] [ss] [sans] [somesans] [default] \definetypeface [somefontset] [tt] [mono] [somemono] [default] \definetypeface [somefontset] [mm] [math] [somemath] [default] \stoptypescript So far things look simple. Given that many fonts follow a similar naming scheme Wolfgang made a module that avoids such definitions altogether. However, being involved in the development of the Antykwa fonts, Mojca ran into the situation that not just four fonts were part of the set but many more. There are several weight (think of light and heavy variants) as well as condensed variants and of course the whole set is not per se a multiple of four. In the meantime, in addition to the file: and name: accessors, ConT E Xt had an additional one tagged spec: where a string made out of weight, style, width etc. is turned into a (best guessed) font name. Therefore the most natural way to deal with the many-fonts-in-a-set dilemma was to provide an additional interface between this specification and the font set and the most robust method was to define all in a goodie file. In this case the goodies are loaded independent of the font, that is: not as a feature. For instance: \loadfontgoodies[antykwapoltawskiego] This file maps obscure fontnames onto the spec: interface so that we can access them in a robust way. \definefont [MyFontA] [file:Iwona-Regular*smallcaps] \definefont [MyFontB] [file:AntykwaTorunska-Regular*smallcaps] \definefont [MyFontC] [file:antpoltltcond-regular*smallcaps] \definefont [MyFontD] [spec:antykwapoltawskiego-bold-italic-condensed-normal*smallcaps] \definefont [MyFontE] [spec:antykwapoltawskiego-bold-italic-normal] The goodies file looks as follows: return {

} name = "antykwa-poltawskiego", version = "1.00", comment = "Goodies that complement Antykwa Poltawskiego", author = "Hans & Mojca", copyright = "ConTeXt development team", files = { name = "antykwapoltawskiego", -- shared list = { ["AntPoltLtCond-Regular.otf"] = { weight = "light", style = "regular", width = "condensed", }, ... ["AntPoltExpd-BoldItalic.otf"] = { weight = "bold", style = "italic", width = "expanded", }, }, }, typefaces = { ["antykwapoltawskiego-light"] = { shortcut = "rm", shape = "serif", fontname = "antykwapoltawskiego", normalweight = "light", boldweight = "medium", width = "normal", size = "default", features = "default", }, ... }, In addition to the files-to-specification mapping, there is also a typeface specification table. This permits the definition of a typeface in the following way: \definetypeface [name=mojcasfavourite, preset=antykwapoltawskiego, normalweight=light, boldweight=bold, width=expanded] 79 Features

}<br />

name = "antykwa-poltawskiego",<br />

version = "1.00",<br />

comment = "Goodies that complement Antykwa Poltawskiego",<br />

author = "Hans & Mojca",<br />

copyright = "ConTeXt development team",<br />

files = {<br />

name = "antykwapoltawskiego", -- shared<br />

list = {<br />

["AntPoltLtCond-Regular.otf"] = {<br />

weight = "light",<br />

style = "regular",<br />

width = "condensed",<br />

},<br />

...<br />

["AntPoltExpd-BoldItalic.otf"] = {<br />

weight = "bold",<br />

style = "italic",<br />

width = "expanded",<br />

},<br />

},<br />

},<br />

typefaces = {<br />

["antykwapoltawskiego-light"] = {<br />

shortcut = "rm",<br />

shape = "serif",<br />

fontname = "antykwapoltawskiego",<br />

normalweight = "light",<br />

boldweight = "medium",<br />

width = "normal",<br />

size = "default",<br />

features = "default",<br />

},<br />

...<br />

},<br />

In addition to the files-to-specification mapping, there is also a typeface specification<br />

table. This permits the definition of a typeface in the following way:<br />

\definetypeface<br />

[name=mojcasfavourite,<br />

preset=antykwapoltawskiego,<br />

normalweight=light,<br />

boldweight=bold,<br />

width=expanded]<br />

79<br />

Features

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

Saved successfully!

Ooh no, something went wrong!