Browse thread
Basic typesetting
-
Matthieu Dubuget
-
Oliver Bandel
-
Matthieu Dubuget
- michael.le_barbier@l...
-
Matthieu Dubuget
-
Oliver Bandel
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | michael.le_barbier@l... |
| Subject: | Re: [Caml-list] Basic typesetting |
Matthieu Dubuget <matthieu.dubuget@gmail.com> writes: > I will certainly have to parse AFM files in order to find font metrics > and use them in order to compute the dimensions I need, then... If you try to compute a ``text object size'' from font metrics the naive way, you will get a coarse approximation of the true result. By computing sizes the naive way, you will not take ``kerning pairs'' neither ``ligatures'' in account. When typesetting `WA' `TA', etc. it is customary to move the `A' on the left. You can see this if you use your preferred typesetting tool (I mean TeX) to process two paragraphs, the first one consisting of `WA' the second one consisting `EA'. Depending on the font setup, you can observe that the first `A' starts ``before'' the second. The pairs `WA' etc. are called kerning pairs. When typesetting ``terrific'' the `fi' pair is usually replaced by a single symbol, this symbol is a (decorative) ligature. So if you use a typesetting engine as a backend to typeset text, you have three ways to know the size of an object: 1. ask the engine; 2. examine the engine's output; 3. reimplement the engine's algorithms. You do not seriously consider 3. as an option, do you? -- Gute Nacht Michaël LB