Hagen - Pragma ADE
Hagen - Pragma ADE Hagen - Pragma ADE
16 Font formats /fonts/tfm/vendor/typeface /fonts/vf/vendor/typeface /fonts/type1/vendor/typeface /fonts/truetype/vendor/typeface /fonts/opentype/vendor/typeface /fonts/fea /fonts/cid /fonts/dvips/enc /fonts/dvips/map There can be multiple roots and the right locations are specified in a configuration file. Currently all engines can use the dvips encoding and map files, so luckily we don’t need to duplicate this. For some reason TrueType and OpenType fonts have different locations and you need to be aware of the fact that some fonts come in both formats (just to confuse users) so you might end up with conflicts. In ConT E Xt we try to make live somewhat easier by also supporting a simple path structure: /fonts/data/vendor/typeface This way files are kept together and installing commercial fonts is less complex and error prone. Also, in practice we only have one set of files now: one of the other OpenType formats. If you want to see the difference between a traditional (pdfT E X or X Ǝ T E X plus ConT E Xt MkII) setup or a modern one (LuaT E X with ConT E Xt MkIV) you can install the ConT E Xt suite (formerly known as minimals). If you explicitly choose for a LuaT E X only setup, you will notice that far less files get installed. 1.9 Text Todo. 1.10 Math Todo. 1.11 Caching lua / luc tma / tmc
2 Modes 2.1 Introduction We use the term modes for classifying the several ways characters are turned into glyphs. When a font is defined, a set of features can be associated and one of them is the mode. none Characters are just mapped onto glyphs and no substitution or positioning takes place. base The routines built into the engine are used. For many Latin fonts this is a rather useable and efficient method. node Here alternative routines written in Lua are used. This mode is needed for more complex scripts as well as more advanced features that demand some analysis. auto This mode will determine the most suitable mode for the given feature set. When we talk about features, we refer to more than only features provided by fonts as ConT E Xt adds some of its own. In the following section each of these modes is discussed. Before we do so a short introduction to font tables that we use is given. 2.2 The font table The internal representation of a font in ConT E Xt is such that we can conveniently access data that is needed in the mentioned modes. When a font is used for the first time, or when it has changed, it is read in its most raw form. After some cleanup and normalization the font gets cached when it is a Type1 or OpenType font. This is done in a rather efficient way. A next time the cached copy is used. The normalized table is shared among instances of a font. This means that when a font is used at a different scale, or when a different feature set is used, the font gets loaded only once and its data is shared when possible. In figure 2.1 we have visualized the process. Say that you ask for font whatever at 12pt using featureset smallcaps. In low level code this boils down to: \font\MySmallCaps=whatever*smallcaps at 12pt In ConT E Xt we have overloaded the font loader so Lua code takes care of the loading. Basically there is a function hooked into LuaT E X’s font definer (the \font primitive) that returns a table and from that on LuaT E X will create its internal representation that is identified by a number, the so called font id. So, in fact the \Whatever command is a reference to a font id, a positive number. When this font is already loaded, ConT E Xt will reuse the id and pas that one. 17 Modes
- 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 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-
2 Modes<br />
2.1 Introduction<br />
We use the term modes for classifying the several ways characters are turned into<br />
glyphs. When a font is defined, a set of features can be associated and one of them<br />
is the mode.<br />
none Characters are just mapped onto glyphs and no substitution or positioning takes<br />
place.<br />
base The routines built into the engine are used. For many Latin fonts this is a rather<br />
useable and efficient method.<br />
node Here alternative routines written in Lua are used. This mode is needed for more<br />
complex scripts as well as more advanced features that demand some analysis.<br />
auto This mode will determine the most suitable mode for the given feature set.<br />
When we talk about features, we refer to more than only features provided by fonts as<br />
ConT E Xt adds some of its own. In the following section each of these modes is discussed.<br />
Before we do so a short introduction to font tables that we use is given.<br />
2.2 The font table<br />
The internal representation of a font in ConT E Xt is such that we can conveniently access<br />
data that is needed in the mentioned modes. When a font is used for the first time, or<br />
when it has changed, it is read in its most raw form. After some cleanup and normalization<br />
the font gets cached when it is a Type1 or OpenType font. This is done in a rather<br />
efficient way. A next time the cached copy is used.<br />
The normalized table is shared among instances of a font. This means that when a<br />
font is used at a different scale, or when a different feature set is used, the font gets<br />
loaded only once and its data is shared when possible. In figure 2.1 we have visualized<br />
the process. Say that you ask for font whatever at 12pt using featureset smallcaps. In<br />
low level code this boils down to:<br />
\font\MySmallCaps=whatever*smallcaps at 12pt<br />
In ConT E Xt we have overloaded the font loader so Lua code takes care of the loading.<br />
Basically there is a function hooked into LuaT E X’s font definer (the \font primitive) that<br />
returns a table and from that on LuaT E X will create its internal representation that is<br />
identified by a number, the so called font id. So, in fact the \Whatever command is a<br />
reference to a font id, a positive number. When this font is already loaded, ConT E Xt will<br />
reuse the id and pas that one.<br />
17<br />
Modes