Hagen - Pragma ADE
Hagen - Pragma ADE Hagen - Pragma ADE
92 Features } } ["LMRoman-Bold"] = { ... }, ["LMRoman-Demi"] = { default = "file:lmromandemi10-regular", }, ["LMRoman-Italic"] = { ... }, ... ["LMRoman-Unslanted"] = { default = "file:lmromanunsl10-regular", }, ["LMSans-Regular"] = { ... }, ["LMTypewriter-Regular"] = { ... }, ... ["LMTypewriterVarWd-DarkOblique"] = { default = "file:lmmonoproplt10-boldoblique", }, ... ["LMTypewriter-CapsOblique"] = { default = "file:lmmonocaps10-oblique", }, The auto option will choose a best fit compatible to the MkII implementation. When default is used instead, the default filename will be taken. Of course one might wonder if there will ever be similar goodie files because design sizes are not that popular nowadays. Not all fonts are perfect and of course the LuaT E X engine can have flaws as well. For this reason we can implement patches. Here is another example of a goodie file that has some more code than just a table: local patches = fonts.handlers.otf.enhancers.patches local function patch(data,filename,threshold) local m = data.metadata.math if m then local d = m.DisplayOperatorMinHeight or 0 if d < threshold then
patches.report("DisplayOperatorMinHeight(%s -> %s)",d,threshold) m.DisplayOperatorMinHeight = threshold end end end patches.register("after","analyze math","asana", function(data,filename) patch(data,filename,1350) end) local function less(value,target,original) return 0.25 * value end local function more(value,target,original) local o = original.mathparameters.DisplayOperatorMinHeight if o < 2800 then return 2800 * target.parameters.factor else return value -- already scaled end end return { name = "asana-math", version = "1.00", comment = "Goodies that complement asana.", author = "Hans Hagen", copyright = "ConTeXt development team", mathematics = { parameters = { DisplayOperatorMinHeight = more, StackBottomDisplayStyleShiftDown = less, StackBottomShiftDown = less, StackDisplayStyleGapMin = less, StackGapMin = less, StackTopDisplayStyleShiftUp = less, StackTopShiftUp = less, StretchStackBottomShiftDown = less, StretchStackGapAboveMin = less, StretchStackGapBelowMin = less, StretchStackTopShiftUp = less, } } } 93 Features
- 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 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 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
- Page 131: [default] [itlc=5] This is demonstr
- Page 134 and 135: 132 Extensions \definefontfeature [
- Page 136 and 137: 134 Extensions characters to improv
- Page 138 and 139: 136 Extensions U+00079 0.05 y 0.05
- Page 140 and 141: 138 Extensions protrusion classes T
- Page 142 and 143: 140 Extensions [fonts.composing.def
92<br />
Features<br />
}<br />
}<br />
["LMRoman-Bold"] = {<br />
...<br />
},<br />
["LMRoman-Demi"] = {<br />
default = "file:lmromandemi10-regular",<br />
},<br />
["LMRoman-Italic"] = {<br />
...<br />
},<br />
...<br />
["LMRoman-Unslanted"] = {<br />
default = "file:lmromanunsl10-regular",<br />
},<br />
["LMSans-Regular"] = {<br />
...<br />
},<br />
["LMTypewriter-Regular"] = {<br />
...<br />
},<br />
...<br />
["LMTypewriterVarWd-DarkOblique"] = {<br />
default = "file:lmmonoproplt10-boldoblique",<br />
},<br />
...<br />
["LMTypewriter-CapsOblique"] = {<br />
default = "file:lmmonocaps10-oblique",<br />
},<br />
The auto option will choose a best fit compatible to the MkII implementation. When<br />
default is used instead, the default filename will be taken. Of course one might wonder<br />
if there will ever be similar goodie files because design sizes are not that popular<br />
nowadays.<br />
Not all fonts are perfect and of course the LuaT E X engine can have flaws as well. For<br />
this reason we can implement patches. Here is another example of a goodie file that has<br />
some more code than just a table:<br />
local patches = fonts.handlers.otf.enhancers.patches<br />
local function patch(data,filename,threshold)<br />
local m = data.metadata.math<br />
if m then<br />
local d = m.DisplayOperatorMinHeight or 0<br />
if d < threshold then