Hagen - Pragma ADE
Hagen - Pragma ADE Hagen - Pragma ADE
72 Features font 46: cambria.ttf @ 24.0pt features analyze=yes, curs=yes, devanagari=yes, extrafeatures=yes, kern=yes, liga=yes, mark=yes, mkmk=yes, mode=node, script=latn, tlig=yes, trep=yes result à à à U+E0:à [glue] U+61:a U+300:̀ [glue] U+E0:à font 80: lmroman10-regular.otf @ 24.0pt features analyze=yes, curs=yes, devanagari=yes, extrafeatures=yes, kern=yes, liga=yes, mark=yes, mkmk=yes, mode=node, script=dflt, tlig=yes, trep=yes result à à à U+E0:à [glue] U+61:a U+300:̀ [glue] U+E0:à font 81: LucidaBrightOT.otf @ 24.0pt features analyze=yes, curs=yes, devanagari=yes, extrafeatures=yes, kern=yes, liga=yes, mark=yes, mkmk=yes, mode=node, script=dflt, tlig=yes, trep=yes step 1 à à à U+E0:à [glue] U+61:a U+300:̀ [glue] U+E0:à feature 'mark', lookup 'mb_DFLT_l_0_s', anchor Anchor-0, bound 1, anchoring mark U+00300 (gravecomb) to basechar U+00061 (a) => (13.8pt,0pt) result à à à U+E0:à [glue] U+61:a U+300:̀ [glue] U+E0:à font 82: texgyrepagella-regular.otf @ 24.0pt features analyze=yes, curs=yes, devanagari=yes, extrafeatures=yes, kern=yes, liga=yes, mark=yes, mkmk=yes, mode=node, script=dflt, tlig=yes, trep=yes result à à à U+E0:à [glue] U+61:a U+300:̀ [glue] U+E0:à You can imagine that when marks are bound to characters that have become ligatures the anchoring is more complex as the font machinery has to keep track of onto which component the mark goes. For this purpose marks as well as base characters and base ligatures have anchors and feature lookups can explicitly refer to them. 5.2.11 Contextual analysis What actually happens when turning a list of characters into a list of glyphs can range from real simple to pretty complex. For instance the smcp feature only has to run over
the list and relate characters to a smallcaps shape. A slightly more complex feature might also demand some positioning. One step further is the use of contextual analysis, i.e. looking at previous, current and following characters (or glyphs). Because features can range from simple to complex the actual processing is not per feature! A font comes with a sequence of so called lookups that relate to a feature, script and language. Also, each feature can use one--to--one, multiple--to--one and many--to--many replacements as well as relative positioning. So, what actually happens is not that a feature is processed, but that all features are dealt with at the same time, in the order that the font prescribes. Enabling a specific feature means that a step is executed, while a disabled feature skips all steps that are tagged as belonging to that feature. And, as each feature can use contextual analysis, you can imagine that the effective sequence of actions can be a complex mix. We need a proper example here, probably something arabic. 5.3 Extras Todo. 5.4 Goodies Goodies range from simple to complex. They share that they are defined in files and loaded at runtime. There is a good change that when you read this, that there are already more goodies than mentioned here. Here we will just mention a couple of goodies. More details can be found in the files that ship with ConT E Xt and have suffix lfg. A goodie file is a regular Lua file and is supposed to return a table. This table collects data that is used for implementing the goodie or relates to a regular feature. It can also provide information that is used for patching a font. An example of a simple goodie file is the ones that accompanies the first release of the OpenType Lucida fonts. return { name = "lucida-opentype-math", version = "1.00", comment = "Goodies that complement lucida opentype.", author = "Hans Hagen", copyright = "ConTeXt development team", mathematics = { alternates = { italic = { feature = 'ss01', value = 1, comment = "Mathematical Alternative Italic" }, } 73 Features
- 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 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 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,
72<br />
Features<br />
font 46: cambria.ttf @ 24.0pt<br />
features analyze=yes, curs=yes, devanagari=yes, extrafeatures=yes,<br />
kern=yes, liga=yes, mark=yes, mkmk=yes, mode=node, script=latn,<br />
tlig=yes, trep=yes<br />
result à à à U+E0:à [glue] U+61:a U+300:̀ [glue] U+E0:à<br />
font 80: lmroman10-regular.otf @ 24.0pt<br />
features analyze=yes, curs=yes, devanagari=yes, extrafeatures=yes,<br />
kern=yes, liga=yes, mark=yes, mkmk=yes, mode=node, script=dflt,<br />
tlig=yes, trep=yes<br />
result à à à U+E0:à [glue] U+61:a U+300:̀ [glue] U+E0:à<br />
font 81: LucidaBrightOT.otf @ 24.0pt<br />
features analyze=yes, curs=yes, devanagari=yes, extrafeatures=yes,<br />
kern=yes, liga=yes, mark=yes, mkmk=yes, mode=node, script=dflt,<br />
tlig=yes, trep=yes<br />
step 1 à à à U+E0:à [glue] U+61:a U+300:̀ [glue] U+E0:à<br />
feature 'mark', lookup 'mb_DFLT_l_0_s', anchor Anchor-0, bound<br />
1, anchoring mark U+00300 (gravecomb) to basechar U+00061 (a)<br />
=> (13.8pt,0pt)<br />
result à à à U+E0:à [glue] U+61:a U+300:̀ [glue] U+E0:à<br />
font 82: texgyrepagella-regular.otf @ 24.0pt<br />
features analyze=yes, curs=yes, devanagari=yes, extrafeatures=yes,<br />
kern=yes, liga=yes, mark=yes, mkmk=yes, mode=node, script=dflt,<br />
tlig=yes, trep=yes<br />
result à à à U+E0:à [glue] U+61:a U+300:̀ [glue] U+E0:à<br />
You can imagine that when marks are bound to characters that have become ligatures<br />
the anchoring is more complex as the font machinery has to keep track of onto which<br />
component the mark goes. For this purpose marks as well as base characters and base<br />
ligatures have anchors and feature lookups can explicitly refer to them.<br />
5.2.11 Contextual analysis<br />
What actually happens when turning a list of characters into a list of glyphs can range<br />
from real simple to pretty complex. For instance the smcp feature only has to run over