Hagen - Pragma ADE
Hagen - Pragma ADE Hagen - Pragma ADE
64 Features \definedfont[lmroman10-regular*default-fijn-nl]\nl effe fijn fietsen This gives: effe fijn fietsen effe fijn fietsen Of course from this result one cannot see what (combination of) substitution(s) was used, but it’s a nice exercise to work out a solution. Multiple substitutions are mostly used for scripts more complex than latin or special fonts like Zapfino where advanced contextual analysis happens. 5.2.6 Alternate substitution Alternates are simple one--to--one substitutions. Popular examples are small capitials and oldstyle numerals. A nice application of alternates is the punk font. This font is a Knuth original. As part of experimenting with the METAPOST library in the early days of LuaT E X and MkIV, runtime randomization was implemented. However, that variant used virtual fonts and was somewhat resource hungry. So, in a later stage Khaled Hosny made an OpenType version using METAPOST output. Randomization is implemented through the rand feature. In MkIV the rand feature is not really special and behaves just like any other (stylistic) alternate. The only difference is that for this feature a value of yes equals random. This also means that any feature that uses alternates use them randomly. \definefontfeature[punknova-first] [mode=node,kern=yes,rand=first] \definefontfeature[punknova-2] [mode=node,kern=yes,rand=2] \definefontfeature[punknova-yes] [mode=node,kern=yes,rand=yes] \definefontfeature[punknova-random][mode=node,kern=yes,rand=random] We use this is: The original punk font is designed by Don Knuth: xxxxxxxxxxxx \definedfont[punknova at 15pt] \getbuffer[sample] \definedfont[punknova*punknova-first at 15pt] \getbuffer[sample] \definedfont[punknova*punknova-2 at 15pt] \getbuffer[sample] \definedfont[punknova*punknova-yes at 15pt] \getbuffer[sample]
\definedfont[punknova*punknova-random at 15pt] \getbuffer[sample] In order to illustrate the variants we show a sequence of x’s. There are upto ten different variants per characters. The original punk font is designed by Don Knuth: xxxxxxxxxxxx The original punk font is designed by Don Knuth: xxxxxxxxxxxx The original punk font is designed by Don Knuth: xxxxxxxxxxxx The original punk font is designed by Don Knuth: xxxxxxxxxxxx The original punk font is designed by Don Knuth: xxxxxxxxxxxx There is one pitfall with random alternates: if each run leads to a different outcome, we can end up in oscillation: different shapes give different paragraphs and we can get more pages or cross references etc. that can end up differently so this is why ConT E Xt always uses the same random seed (which gets reset when you purge the auxiliary files. 5.2.7 Ligature substitution A ligature is traditionally a combination of several characters into one. Popular ligatures are ‘fi’, ‘fl’, ‘ffi’ and , ‘ffl’. Occasionally we see ‘æ’, ‘œ’ and some more. Often ligatures are language dependant. For instance in languages like Dutch and German there can be compound words where one part ends with an f and the next part starts with an f and that looks bad or at least not intuitive. To some extent one can wonder if this tradition of ligatures is a good one. It definitely made sense ages ago, but I wouldn’t be surprised if they are often added to fonts because the encoding vectors have them. After all, nothing prevents to go ahead and come up with way more ligatures. There can be many ligature features in a font. Although we support arbitrary features, that is: those not registered as being official one way or the other, the following are known by description: clig contextual ligatures dlig discretionary ligatures hlig historical ligatures liga standard ligatures rlig required ligatures tlig traditional tex ligatures The default feature set has type liga as wel as the T E X specific tlig that replaces successive hyphen signs into en- and emdashes. The arabic feature set also has rlig enabled. Now, there is one thing you should realize when we discuss specific features and the underlaying mechanisms: there is no real relationship between the features’s name and the mechanisms used: any feature can use any underlying mechanism or combination. This is why deep down we see that what is internally called ligature gets used for any purpose where multiple--to--one replacements happen, and why the liga feature can use 65 Features
- 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 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 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
64<br />
Features<br />
\definedfont[lmroman10-regular*default-fijn-nl]\nl effe fijn fietsen<br />
This gives:<br />
effe fijn fietsen<br />
effe fijn fietsen<br />
Of course from this result one cannot see what (combination of) substitution(s) was used,<br />
but it’s a nice exercise to work out a solution.<br />
Multiple substitutions are mostly used for scripts more complex than latin or special<br />
fonts like Zapfino where advanced contextual analysis happens.<br />
5.2.6 Alternate substitution<br />
Alternates are simple one--to--one substitutions. Popular examples are small capitials<br />
and oldstyle numerals.<br />
A nice application of alternates is the punk font. This font is a Knuth original. As<br />
part of experimenting with the METAPOST library in the early days of LuaT E X and MkIV,<br />
runtime randomization was implemented. However, that variant used virtual fonts and<br />
was somewhat resource hungry. So, in a later stage Khaled Hosny made an OpenType<br />
version using METAPOST output. Randomization is implemented through the rand feature.<br />
In MkIV the rand feature is not really special and behaves just like any other (stylistic)<br />
alternate. The only difference is that for this feature a value of yes equals random. This<br />
also means that any feature that uses alternates use them randomly.<br />
\definefontfeature[punknova-first] [mode=node,kern=yes,rand=first]<br />
\definefontfeature[punknova-2] [mode=node,kern=yes,rand=2]<br />
\definefontfeature[punknova-yes] [mode=node,kern=yes,rand=yes]<br />
\definefontfeature[punknova-random][mode=node,kern=yes,rand=random]<br />
We use this is:<br />
The original punk font is designed by Don Knuth: xxxxxxxxxxxx<br />
\definedfont[punknova at 15pt] \getbuffer[sample]<br />
\definedfont[punknova*punknova-first at 15pt] \getbuffer[sample]<br />
\definedfont[punknova*punknova-2 at 15pt] \getbuffer[sample]<br />
\definedfont[punknova*punknova-yes at 15pt] \getbuffer[sample]