Hagen - Pragma ADE
Hagen - Pragma ADE Hagen - Pragma ADE
44 Modes MkIV run can be faster than a MkII run, especially when METAPOST is used. In ConT E Xt processing of node lists with respect to fonts is only one of the many manipulations of such lists and by now fonts are not really the bottleneck. The more not font related features users demand and enable, the less the relative impact of font processing becomes. Also, there are some advanced typographic extras that LuaT E X offers, like protrusion (think of hanging punctuation) and hz optimization (glyph scaling) and these slow down processing quite a lot, and they are not taking place at the Lua end at all, but this might change in MkIV. And, of course, typesetting involves more than fonts and other aspects can be way more demanding.
3 Lookups 3.1 Introduction In traditional T E X a font is defined by referring to its filename. A definition looks like this: \font \MyFontA = lmr10 \font \MyFontB = lmr10 at 20pt \font \MyFontC = lmr10 scaled 1500 The first definition defines the command MyFontA as a reference to the font stored in the file lmx10. No scaling takes place so the natural size is taken. This so called designsize is in no way standardized. Just look at these three specimen: Design Size (Dejavu) Design Size (Cambria) Design Size (Latin Modern) The designsize is normally 10 point, but as there is no real reference for this a designer decides how to translate this into a visual representation. As a consequence the 20pt in the second line of the example definitions only means that the font is scaled to (normally) twice the designsize. The third line scaled by a factor 1.5 and the reason for using a value thousand times larger is that T E X’s numbers are integers. The next three lines are typical for Latin Modern (derived from Computer Modern) because this family comes in different design sizes. \font \MyFontD = lmr12 \font \MyFontE = lmr12 at 20pt \font \MyFontF = lmr12 scaled 1500 Because the designsize is part of the font metrics the second line (\MyFontE) is of similar size as \MyFontB although the 12 point variant is visually better suited for scaling up. These definitions refer to files, but what file? What gets loaded is the file with name name.tfm. Eventually for embedding in the (let’s assume pdf) file the outlines are taken from name.pfb. At that stage, when present, a name.vf is consulted in order to resolve characters that are combinations of others (potentially from other pfb files). The mapping from name.tfm to name.pfb filename happens in the so called map file. This means that one can also refer to another file, for instance name.ttf. All this logic is hard coded in the engine and because the virtual font mechanism was introduced later without extending the tfm format, it can be hard at times to figure out issues when a (maybe obsolete) virtual file is present (this can be the case if you have generated the tfm file from an afm file that comes with the pfb file when you buy one. But, in LuaT E X we no longer use traditional fonts and as a consequence we have more options open. Before we move on to them, we mention yet another definition: 45 Lookups
- 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 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"] =
3 Lookups<br />
3.1 Introduction<br />
In traditional T E X a font is defined by referring to its filename. A definition looks like<br />
this:<br />
\font \MyFontA = lmr10<br />
\font \MyFontB = lmr10 at 20pt<br />
\font \MyFontC = lmr10 scaled 1500<br />
The first definition defines the command MyFontA as a reference to the font stored in the<br />
file lmx10. No scaling takes place so the natural size is taken. This so called designsize<br />
is in no way standardized. Just look at these three specimen:<br />
Design Size (Dejavu)<br />
Design Size (Cambria)<br />
Design Size (Latin Modern)<br />
The designsize is normally 10 point, but as there is no real reference for this a designer<br />
decides how to translate this into a visual representation. As a consequence the<br />
20pt in the second line of the example definitions only means that the font is scaled to<br />
(normally) twice the designsize. The third line scaled by a factor 1.5 and the reason for<br />
using a value thousand times larger is that T E X’s numbers are integers.<br />
The next three lines are typical for Latin Modern (derived from Computer Modern)<br />
because this family comes in different design sizes.<br />
\font \MyFontD = lmr12<br />
\font \MyFontE = lmr12 at 20pt<br />
\font \MyFontF = lmr12 scaled 1500<br />
Because the designsize is part of the font metrics the second line (\MyFontE) is of similar<br />
size as \MyFontB although the 12 point variant is visually better suited for scaling up.<br />
These definitions refer to files, but what file? What gets loaded is the file with name<br />
name.tfm. Eventually for embedding in the (let’s assume pdf) file the outlines are taken<br />
from name.pfb. At that stage, when present, a name.vf is consulted in order to resolve<br />
characters that are combinations of others (potentially from other pfb files). The mapping<br />
from name.tfm to name.pfb filename happens in the so called map file. This means<br />
that one can also refer to another file, for instance name.ttf.<br />
All this logic is hard coded in the engine and because the virtual font mechanism was<br />
introduced later without extending the tfm format, it can be hard at times to figure out<br />
issues when a (maybe obsolete) virtual file is present (this can be the case if you have<br />
generated the tfm file from an afm file that comes with the pfb file when you buy one.<br />
But, in LuaT E X we no longer use traditional fonts and as a consequence we have more<br />
options open. Before we move on to them, we mention yet another definition:<br />
45<br />
Lookups