13.07.2013 Views

Hagen - Pragma ADE

Hagen - Pragma ADE

Hagen - Pragma ADE

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

14<br />

Font formats<br />

can be rules that turn 1/2 into one glyph, or transfer the numbers into superior and<br />

inferior alternatives, but leaves us with an unacceptable rendered 1/a, given that the<br />

frac features is enabled. It looks like features like this are to be applied to a manually<br />

selected range of characters.<br />

The fact that an OpenType font can contain many features and rules to apply them<br />

makes it possible to typeset scripts like Arabic. And this is where it gets vague. A generic<br />

OpenType sub-engine can do clever things using these rules, but if you read the specification<br />

for some scripts additional intelligence has to be provided by the typesetting<br />

engine.<br />

While users no longer have to care about encodings, map files and back-end issues,<br />

they do have to carry knowledge about the possibilities and limitations of features. Even<br />

worse, he or she needs to be aware that fonts can have bugs. Also, as font vendors have<br />

no tradition of providing updates this is something that we might need to take care of<br />

ourselves by tweaking the engine.<br />

One of the problems with the transition from Type1 to OpenType is that font designers<br />

can take an existing design and start from that basic repertoire of shapes. If such a<br />

design had oldstyle figures only, there is a good chance that this will be the case in the<br />

OpenType variant too. However, such a default interferes with the fact that the onum<br />

feature is one that we explicitly have to enable. This means that writing a generic style<br />

where a font is later plugged in becomes somewhat messy if it assumes that features<br />

need to be turned on.<br />

T E X users expect more control, which means that in practice just an OpenType engine<br />

is not enough, but for the average font the T E X model using the traditional approach<br />

still is quite acceptable. After all, not all users use complex scripts or need advanced<br />

features. And, in practice most readers don’t notice the difference anyway.<br />

1.7 Lua<br />

A.7 As mentioned support for virtual fonts is built into LuaT E X and loading the so called vf<br />

files happens when needed. However, that concerns traditional fonts that we already<br />

covered. In ConT E Xt we do use the virtual font mechanism for creating missing glyphs<br />

out of existing ones or add fallbacks when this is not possible. But this is not related to<br />

some kind of font format.<br />

In 2010 and 2011 the first public OpenType math fonts showed up that replace their<br />

Type1 originals. In ConT E Xt we already went forward and created virtual Unicode fonts<br />

out of traditional fonts. Of course eventually the defaults will change to the OpenType<br />

alternatives. The specification for such a virtual font is given in Lua tables and therefore<br />

you can consider Lua to be a font format as well. In ConT E Xt such fonts can be defined<br />

in so called goodies files. As we use these files for much more tuning, we come back to<br />

that in a later chapter. In a virtual font you can mix real Type1 fonts and real OpenType<br />

fonts using whatever metrics suit best.<br />

An extreme example is the virtual Unicode Punk font. This font is defined in the<br />

METAPOST language (derived from Don Knuths METAFONT sources) where each glyph is<br />

one graphic. Normally we get PostScript, but in LuaT E X we can also get output in a

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

Saved successfully!

Ooh no, something went wrong!