Hagen - Pragma ADE
Hagen - Pragma ADE Hagen - Pragma ADE
6 Introduction In this manual we will look at fonts from the perspective of yet another descendant, LuaT E X. It inherits the font technology from traditional T E X, but also extends it so that we can deal with modern font technologies. Of course it offers much more, but in practice much relates to fonts one way or the other. Of course this exploration will be from the perspective of the ConT E Xt macro package but this is not a manual about how to use fonts in ConT E Xt as we have another manual for that. Much of what we say here applies to the generic font code as well, although some more advanced control is ConT E Xt specific. There is nothing real new here, and it all evolved from common sense and dealing with T E X for many years. The perspective is mostly that of being a user myself. There is some overlap between the chapter. This is because each chapter is written from another perspective and this document quite certainly will not be read as a whole but more by looking at examples. This document is still under construction. The functionality discussed here will stay and more might show up. Of course there are errors, and they’re all mine. Hans Hagen PRAGMA ADE, Hasselt NL Summer 2011 – Spring 2013
1 Font formats 1.1 Introduction In this chapter the font formats as we know them will be introduced. The descriptions will be rather general but more details can be found in the appendix. Although in MkIV we do support all these types eventually the focus will be on OpenType fonts but it does not hurt to see where we are coming from. 1.2 Glyphs A typeset text is mostly a sequence of characters turned into glyphs. We talk of characters when you input the text, but the visualization involves glyphs. When you copy a part of the screen in an open pdf document or html page back to your editor you end up with characters again. In case you wonder why we make this distinction between these two states we give an example. affiliation affiliation upright italic Figure 1.1 From characters to glyphs. We see here that the shape of the a is different for an upright serif and an italic. We also see that in ffi there is no dot on the i. The first case is just a stylistic one but the second one, called a ligature, is actually one shape. The 11 characters are converted into 9 glyphs. Hopefully the final document format carries some extra information about this transformation so that a cut and paste will work out well. In pdf files this is normally the case. In this document we will not be too picky about the distinction as in most cases the glyph is rather related to the character as one knows it. So, a font contains glyphs and it also carries some information about replacements. In addition to that there needs to be at least some information about the dimensions of them. Actually, a typesetting engine does not have to know anything about the actual shape at all. a b g l q . ; ? ffi Figure 1.2 The boundingbox of some normal glyphs. 7 Font formats
- 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 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 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
1 Font formats<br />
1.1 Introduction<br />
In this chapter the font formats as we know them will be introduced. The descriptions<br />
will be rather general but more details can be found in the appendix. Although in MkIV<br />
we do support all these types eventually the focus will be on OpenType fonts but it does<br />
not hurt to see where we are coming from.<br />
1.2 Glyphs<br />
A typeset text is mostly a sequence of characters turned into glyphs. We talk of characters<br />
when you input the text, but the visualization involves glyphs. When you copy a<br />
part of the screen in an open pdf document or html page back to your editor you end up<br />
with characters again. In case you wonder why we make this distinction between these<br />
two states we give an example.<br />
affiliation affiliation<br />
upright italic<br />
Figure 1.1 From characters to glyphs.<br />
We see here that the shape of the a is different for an upright serif and an italic. We<br />
also see that in ffi there is no dot on the i. The first case is just a stylistic one but the<br />
second one, called a ligature, is actually one shape. The 11 characters are converted<br />
into 9 glyphs. Hopefully the final document format carries some extra information about<br />
this transformation so that a cut and paste will work out well. In pdf files this is normally<br />
the case. In this document we will not be too picky about the distinction as in most cases<br />
the glyph is rather related to the character as one knows it.<br />
So, a font contains glyphs and it also carries some information about replacements.<br />
In addition to that there needs to be at least some information about the dimensions of<br />
them. Actually, a typesetting engine does not have to know anything about the actual<br />
shape at all.<br />
a b g l q . ; ? ffi<br />
Figure 1.2 The boundingbox<br />
of some normal glyphs.<br />
7<br />
Font formats