94 Features In fact, in addition to already mentioned mapfiles and virtuals subtables, we can pass variables and overload parameters. return { name = "lm-math", ... mathematics = { mapfiles = { ... }, virtuals = { ... variables = { joinrelfactor = 3, -- default anyway }, parameters = { -- test values -- FactorA = 123.456, -- FactorB = false, -- FactorC = function(value,target,original) -- return 7.89 * target.factor -- end, -- FactorD = "Hi There!", }, } } This kind of goodie functionality is typical for the development of LuaT E X and experimental math fonts and no user should ever be bothered with it. However, it demonstrates that we’re not stuck with only features built in the fonts. It can be that a user is not satisfied by some aspects of a math font design. There is not much that we can do about the shapes, but we can manipulate for instance dimensions. For this there are two mechanism available: automatically applied dimensional fixes and a mathdimensions feature. Both work with the same goody specification. mathematics = { ... dimensions = { }, ... } The entries in a dimensions table are tables themselves. There can be many of them so one can organize dimensional tweaks in groups. The default group is always applied, while others are applied on demand. Say that want to tweak all ± and ∓. 6 6 In fact, this mechanism is a a response to a mail on the ConTE Xt mailing list.
mathematics = { dimensions = { default = { [0x00B1] = { -- ± height = 500, depth = 0, }, [0x2213] = { -- ∓ height = 500, depth = 0, }, }, }, } This will give these two characters a different height and depth. However, this will not have much effect in rendering (much larger dimensions might have). mathematics = { dimensions = { default = { [0x00B1] = { -- ± yoffset = 100, }, [0x2213] = { -- ∓ yoffset = -100, }, }, }, } This will raise and lower the glyphs in their bounding boxes and give them an appearance more close to their ancestors. But defined this way, they are always applied and that might not be what we want. So, we can do this: mathematics = { dimensions = { signs = { [0x00B1] = { -- ± yoffset = 100, }, [0x2213] = { -- ∓ yoffset = -100, }, }, }, 95 Features
- Page 1:
explaining luatex and mkiv Fonts ou
- Page 4 and 5:
2 Contents 5.4 Goodies 73 5.5 Analy
- Page 6 and 7:
4 Contents
- Page 8 and 9:
6 Introduction In this manual we wi
- Page 10 and 11:
8 Font formats a b g l q . ; ? ffi
- Page 12 and 13:
10 Font formats When T E X ships ou
- Page 14 and 15:
12 A.4 A.3 Font formats multiple ac
- Page 16 and 17:
14 Font formats can be rules that t
- Page 18 and 19:
16 Font formats /fonts/tfm/vendor/t
- Page 20 and 21:
18 Modes raw tfm normalized tfm raw
- Page 22 and 23:
20 Modes shown next: kern cyrl dflt
- Page 24 and 25:
22 Modes ccmp cyrl mkd абвгде
- 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 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 94 and 95: 92 Features } } ["LMRoman-Bold"] =
- 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
- Page 144 and 145: 142 } Extensions top = { x = -250,
- Page 146 and 147:
144 Extensions
- Page 148 and 149:
146 Hooks
- Page 150 and 151:
148 ) Appendix (LIG C l O 10) (KRN
- Page 152 and 153:
150 ) Appendix (KRN O 177 R 0.056)
- Page 154 and 155:
152 Appendix Notice Copyright 2003-
- Page 156 and 157:
154 Appendix ... KPX seven.prop hyp
- Page 158 and 159:
156 Appendix name = , features = ,
- Page 160 and 161:
158 Appendix [] = "", ... default =
- Page 162:
160 Appendix A.10 Discretionary nod