Hagen - Pragma ADE
Hagen - Pragma ADE Hagen - Pragma ADE
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
- Page 30 and 31: 28 Modes salt latn mol abcdefghijkl
- Page 32 and 33: 30 Modes glyph 256 font 42: U+00074
- Page 34 and 35: 32 Modes glyph 256 font 33: U+00061
- Page 36 and 37: 34 Modes glyph 256 font 33: U+00065
- Page 38 and 39: 36 Modes optimizer that can apply a
- Page 40 and 41: 38 Modes ا خLJَ﮲ ف﮲َ step
- Page 42 and 43: 40 Modes dir +TRT glyph 256 font 49
- Page 44 and 45: 42 Modes and now we get: 123 normal
- Page 46 and 47: 44 Modes MkIV run can be faster tha
- Page 48 and 49: 46 Lookups \font \MyFontG = lmr12 s
- Page 50 and 51: 48 Lookups 3.4 Name Say that we wan
- Page 52 and 53: 50 Lookups We add another specifier
- Page 54 and 55: 52 Methods \definefont [MyFont] [Bo
- Page 56 and 57: 54 Methods } copyright = "ConTeXt d
- Page 58 and 59: 56 Features of all, all we get to s
- Page 60 and 61: 58 Features in base mode. A single
- Page 62 and 63: 60 Features accumulate within a wor
- Page 64 and 65: 62 Features features analyze=yes, c
- Page 66 and 67: 64 Features \definedfont[lmroman10-
- Page 68 and 69: 66 Features single substitutions or
- Page 70 and 71: 68 F -0.492 eatures result ffi feat
- Page 72 and 73: 70 Features font 80: lmroman10-regu
- Page 74 and 75: 72 Features font 46: cambria.ttf @
- Page 76 and 77: 74 Features } } This goodie file is
- Page 78 and 79: 76 Features { name = "msbm10.tfm",
- Page 82 and 83: 80 Features \setupbodyfont [mojcasf
- Page 84 and 85: 82 Features } normalweight = "extra
- Page 86 and 87: 84 Features "QF.waqf", "SKTH.waqf",
- Page 88 and 89: 86 Features featureset=smallcaps] O
- Page 90 and 91: 88 Features } }, When defining the
- Page 92 and 93: 90 Features local defaultfraction =
- Page 94 and 95: 92 Features } } ["LMRoman-Bold"] =
- Page 96 and 97: 94 Features In fact, in addition to
- Page 98 and 99: 96 Features } This time the applica
- Page 100 and 101: 98 Features step 1 I don't wanna kn
- Page 102 and 103: 100 Features If you’re lucky your
- Page 104 and 105: 102 Scripts
- Page 121 and 122: However, when we go the other way,
- Page 124: 122 Math the regular a--z character
- Page 127 and 128: While there are lots of text fonts,
- Page 129 and 130: 8 Extensions 8.1 Introduction One o
}<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