[texhax] TeX Queries (2): Artificial Break
paulrichardstanley at gmail.com
Wed Jul 18 06:33:08 CEST 2012
> How can the declared width be less than the real width?
The "declared width" is independent of the shape of the glyph. It
also takes side bearings into account. Its sole purpose is to tell
where to place the next glyph. Thus it's also called "advance
width". BTW, it refers to the baseline, not to a
rectangle. Therefore, if a font is slanted, extra space is needed
between the last slanted glyph and the next upright glyph.
There is no canvas limiting the size of a glyph because a glyph
description is a mathematical construct rather than something
physical. Glyph descriptions can even have negative coordinates
(required for descenders, at least). The only limitation is that
coordinate pairs in Type1 and TrueType fonts are integer numbers with
a limited range.
I suppose on the computer screen the painting-on-a-canvas analogy
would translate as a rectangular area containing the glyph. I was
under the impression that the declared (or advanced)width measured
the distance between the two sides of this rectangle. As it only
measures a portion of the line occupied by the glyph at the baseline
(including the side bearings) the canvas analogy is a bit misleading.
Actually, more than just a bit.
Are descenders glyphs that *descend* below the baseline?
You are wondering why the physical width of an "f" exceeds advance
width in some fonts. The reason is that if you derive the advance
width from the bounding box of the glyph shape, you need zillions of
kerning pairs. An "f" is usually followed by another lowercase
character. If the latter is an "i" or "l", ligatures are used
anyway. In all other cases it's fine that the bow of the "f"
surmounts the following glyph. If an "f" is followed by an uppercase
letter, kerning has to be applied, of course.
Just to confirm, does kerning concerns both the adding and
subtracting from the advanced width of the glyph?
Could you please elaborate why many more kerning pairs would be
needed? I'm not sure if i understand the problem.
Fonts are usually optimized to work with the least amount of kerning
pairs. Font designers also have to take into account that Microsoft
refuses to support kerning in Type1 fonts at all, deliberately.
yes, kerning pairs can be an accessibility pain in the ... They are
either invisible to the screen reader or show up as strange control
characters (which comes to the same thing).
More information about the texhax