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.

12<br />

A.4<br />

A.3<br />

Font formats<br />

multiple accents which lead to many more distinctive heights and depths.<br />

Concerning ligatures we can remark that there are quite some substitutions possible<br />

although in practice only the multiple to one replacement has been used.<br />

Some fonts that are used in T E X started out as bitmaps but rather soon Type1 outline<br />

fonts became the fashion. These are supported using the map files that we will discuss<br />

later. First we look into Type1 fonts.<br />

1.5 Type1<br />

A.5 For a long time Type1 fonts have dominated the scene. These are PostScript fonts that<br />

can have more that 256 glyphs in the file that defines the shapes, but only 256 of them<br />

can be used at one time. Of course there can be multiple subsets active in one document.<br />

In traditional T E X a Type1 font is used by making a tfm file from a so called Adobe<br />

metric file (afm) that come with such a font. There are several tool chains for doing<br />

this and ConT E Xt MkII ships with one that can be of help when you need to support<br />

commercial fonts. Projects like the Latin Modern Fonts and T E X Gyre have normalized a<br />

whole lot of fonts that came in several more or less complete encodings into a consistent<br />

package of Type1 fonts. This already simplified live a lot but still users had to choose<br />

a suitable input and font encoding for their language and/or script. As T E X only cares<br />

about metrics and not about the rendering, it doesn’t consider Type1 fonts as something<br />

special. Also, as T E X and PostScript were developed about the same time support for<br />

Type1 fonts is rather present in T E X distributions.<br />

You can still follow this route but for ConT E Xt MkIV this is no longer the recommended<br />

way because there we have changed the whole subsystem to use Unicode. As a result<br />

we no longer use tfm files derived from afm files, but directly interpret the afm data.<br />

This not only removes the 256 limitation, but also brings more resolution in height and<br />

depth as we no longer have at most 16 alternatives. There can also be more kerns. Of<br />

course we need some heuristics to determine for instance the spacing but that is not<br />

different from former times.<br />

Because most T E X users don’t use commercial fonts, they will not notice that ConT E Xt<br />

MkIV treats Type1 fonts this way. One reason is that the free fonts also come as wide<br />

fonts in OpenType format and whenever possible ConT E Xt prefers OpenType over Type1<br />

over tfm.<br />

In the beginning LuaT E X only could load a tfm file, which is why loading afm files is<br />

implemented in Lua. Later, when the OpenType loaded was added, loading pfb and afm<br />

files also became possible but it’s slower and we see no reason to rewrite the current<br />

code in ConT E Xt. We also do a couple of extra things when loading such a file. As more<br />

Type1 fonts move on to OpenType we don’t expect that much usage anyway.<br />

1.6 OpenType<br />

A.6 When an engine can deal with Unicode directly it also means that internally it uses pretty<br />

large numbers for storing characters and glyph indices. The first T E X descendent that

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

Saved successfully!

Ooh no, something went wrong!