29.05.2014 Views

The history of luaTEX 2006–2009 / v 0.50 - Pragma ADE

The history of luaTEX 2006–2009 / v 0.50 - Pragma ADE

The history of luaTEX 2006–2009 / v 0.50 - Pragma ADE

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

As you can see, it is possible to add alphabets, given that there is a suitable vector that<br />

maps glyph indices onto Unicodes. It is good to know that this function only denes the<br />

way such a font is constructed. <strong>The</strong> actual construction is delayed till the font is needed.<br />

Such a virtual font is used in typescripts (the building blocks <strong>of</strong> typeface denitions in<br />

ConTEXt) as follows:<br />

\starttypescript [math] [palatino] [name]<br />

\definefontsynonym [MathRoman] [pxmath@px-math]<br />

\loadmapfile[original-youngryu-px.map]<br />

\stoptypescript<br />

If you're familiar with the way fonts are dened in ConTEXt, you will notice that we no<br />

longer need to dene MathItalic, MathSymbol and additional symbol fonts. Of course<br />

users don't have to deal with these issues themselves. <strong>The</strong> @ triggers the virtual font<br />

builder.<br />

You can imagine that in MkII switching to another font style or size involves initializing<br />

(or at least checking) involves some 30 to 40 font denitions when it comes to math (the<br />

number <strong>of</strong> used families times 3, the number o fmath sizes.). And even if we take into<br />

account that fonts are loaded only once, this checking and enabling takes time. Keep in<br />

mind that in ConTEXt we can have several math font sets active in one document which<br />

comes at a price.<br />

In MkIV we use one family (at three sizes). Of course we need to load the font (and more<br />

than one in the case <strong>of</strong> virtual variants) but when switching bodyfont sizes we only need<br />

to enable one (already dened) math font. And that really saves time. This is one <strong>of</strong> the<br />

areas where we gain back time that we loose elsewhere by extending core functionality<br />

using Lua (like OpenType support).<br />

dimensions<br />

By setting font related dimensions you can control the way TEX positions math elements<br />

relative to each other. Math fonts have a few more dimensions than regular text fonts. But<br />

OpenType math fonts like Cambria have quite some more. <strong>The</strong>re is a nice booklet published<br />

by Micros<strong>of</strong>t, ‘Mathematical Typesetting’, where dealing with math is discussed<br />

in the perspective <strong>of</strong> their word processor and TEX. In the booklet some <strong>of</strong> the parameters<br />

are discussed and since many <strong>of</strong> them are rather special it makes no sense (yet) to<br />

elaborate on them here. 7 Figuring out their meaning was quite a challenge.<br />

I am the rst to admit that the current code in MkIV that deals with math parameters is<br />

somewhat messy. <strong>The</strong>re are several reasons for this:<br />

7<br />

Googling on ‘Ulrich Vieth’, ‘TeX’ and ‘conferences’ might give you some hits on articles on these matters.<br />

282 Unicode math

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

Saved successfully!

Ooh no, something went wrong!