Hagen - Pragma ADE

Hagen - Pragma ADE Hagen - Pragma ADE

context.aanhet.net
from context.aanhet.net More from this publisher
13.07.2013 Views

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

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

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!