Hagen - Pragma ADE
Hagen - Pragma ADE Hagen - Pragma ADE
74 Features } } This goodie file is only providing information about the meaning of a stylistic alternate. These have abstract tags like ss01 and in this case this category collects alternative italic (calligraphic) shapes. Because math does not follow the same rules as text, this feature is enabled explicitly. In the goodie file of Xits math the alternates table has more entries: alternates = { cal = { ... comment = "Mathematical Calligraphic Alphabet" }, greekssup = { ... comment = "Mathematical Greek Sans Serif Alphabet" }, greekssit = { ... comment = "Mathematical Italic Sans Serif Digits" }, monobfnum = { ... comment = "Mathematical Bold Monospace Digits" }, mathbbbf = { ... comment = "Mathematical Bold Double-Struck Alphabet" }, mathbbit = { ... comment = "Mathematical Italic Double-Struck Alphabet" }, mathbbbi = { ... comment = "Mathematical Bold Italic Double-Struck Alphabet" }, upint = { ... comment = "Upright Integrals" }, vertnot = { ... comment = "Negated Symbols With Vertical Stroke" }, } An alternate is triggered at the T E X end with: $ABC$ $\cal ABC$ $\mathalternate{cal}\cal ABC$ This is an example of a dynamic feature that gets applied when enabled at a specific location in the input. The cal is only recognized when it is defined in a goodies file, where the value is defined (in all of the above cases the value is 1). The Xits math fonts has a goodie files that starts with: return { name = "xits-math", version = "1.00", comment = "Goodies that complement xits (by Khaled Hosny).", author = "Hans Hagen", copyright = "ConTeXt development team", mathematics = { italics = { ["xits-math"] = italics, }, alternates = { Here the italics variable is a table defined before the return that looks as follows: local italics = { defaultfactor = 0.025,
} disableengine = true, corrections = { -- [0x1D44E] = 0.99, -- a (fraction of quad) -- [0x1D44F] = 100, -- b (font points) [0x1D453] = -0.0375, -- f } This rather specific table tells ConT E Xt that (when enabled) it has to apply italic correction. It disables support built into the T E X engine (which in the case of LuaT E X is close to absent anyway). It will apply a default italic correction of 0.025 but for some shapes a different value is used. Again we have some commands at the T E X end: \setupmathematics[italics=1] % fontitalics \setupmathematics[italics=2] % fontdata \setupmathematics[italics=3] % quad based \setupmathematics[italics=4] % combination of 1 and 3 Because (definitely at the start of the LuaT E X project) we had no proper OpenType math fonts, but at the same time wanted to move on to OpenType and Unicode math and no longer struggle with all those math families and definitions. The way out of this problem is to define a virtual math font. The code for doing this is built into the MkIV core but is controlled by a goodie definition. Take for instance Antykwa Math: return { name = "antykwa-math", version = "1.00", comment = "Goodies that complement antykwa math.", author = "Hans, Mojca, Aditya", copyright = "ConTeXt development team", mathematics = { mapfiles = { "antt-rm.map", "antt-mi.map", "antt-sy.map", "antt-ex.map", "mkiv-base.map", }, virtuals = { ["antykwa-math"] = { { name = "file:AntykwaTorunska-Regular", features = "virtualmath", main = true }, { name = "mi-anttri.tfm", vector = "tex-mi", skewchar=0x7F }, { name = "mi-anttri.tfm", vector = "tex-it", skewchar=0x7F }, { name = "sy-anttrz.tfm", vector = "tex-sy", skewchar=0x30, parameters = true } , { name = "ex-anttr.tfm", vector = "tex-ex", extension = true } , { name = "msam10.tfm", vector = "tex-ma" }, 75 Features
- Page 26 and 27: 24 Modes dlig latn gag abcdefghijkl
- Page 28 and 29: 26 Modes liga latn nsm abcdefghijkl
- 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 78 and 79: 76 Features { name = "msbm10.tfm",
- Page 80 and 81: 78 Features \starttypescript[somefo
- 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
74<br />
Features<br />
}<br />
}<br />
This goodie file is only providing information about the meaning of a stylistic alternate.<br />
These have abstract tags like ss01 and in this case this category collects alternative<br />
italic (calligraphic) shapes. Because math does not follow the same rules as text, this<br />
feature is enabled explicitly.<br />
In the goodie file of Xits math the alternates table has more entries:<br />
alternates = {<br />
cal = { ... comment = "Mathematical Calligraphic Alphabet" },<br />
greekssup = { ... comment = "Mathematical Greek Sans Serif Alphabet" },<br />
greekssit = { ... comment = "Mathematical Italic Sans Serif Digits" },<br />
monobfnum = { ... comment = "Mathematical Bold Monospace Digits" },<br />
mathbbbf = { ... comment = "Mathematical Bold Double-Struck Alphabet" },<br />
mathbbit = { ... comment = "Mathematical Italic Double-Struck Alphabet" },<br />
mathbbbi = { ... comment = "Mathematical Bold Italic Double-Struck Alphabet" },<br />
upint = { ... comment = "Upright Integrals" },<br />
vertnot = { ... comment = "Negated Symbols With Vertical Stroke" },<br />
}<br />
An alternate is triggered at the T E X end with:<br />
$ABC$ $\cal ABC$ $\mathalternate{cal}\cal ABC$<br />
This is an example of a dynamic feature that gets applied when enabled at a specific<br />
location in the input. The cal is only recognized when it is defined in a goodies file,<br />
where the value is defined (in all of the above cases the value is 1).<br />
The Xits math fonts has a goodie files that starts with:<br />
return {<br />
name = "xits-math",<br />
version = "1.00",<br />
comment = "Goodies that complement xits (by Khaled Hosny).",<br />
author = "Hans <strong>Hagen</strong>",<br />
copyright = "ConTeXt development team",<br />
mathematics = {<br />
italics = {<br />
["xits-math"] = italics,<br />
},<br />
alternates = {<br />
Here the italics variable is a table defined before the return that looks as follows:<br />
local italics = {<br />
defaultfactor = 0.025,