[texhax] TeX Queries (2): Artificial Break

Reinhard Kotucha reinhard.kotucha at web.de
Sun Jul 15 05:10:19 CEST 2012


On 2012-07-14 at 22:28:13 +0100, Paul Stanley wrote:

 > How can the declared width be less than the real width?  I've this 
 > image of a painting taking up more space 	than is available on the 
 > canvas, or is it the case that the declared width can be less than 
 > the real width only in parts where kerning is possible? Incidentally, 
 > I'm using the term kerning in the original sense as defined by 
 > wikipedia (http://en.wikipedia.org/wiki/Kerning )

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.

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.

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.

Regards,
  Reinhard

-- 
----------------------------------------------------------------------------
Reinhard Kotucha                                      Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover                              mailto:reinhard.kotucha at web.de
----------------------------------------------------------------------------
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.
----------------------------------------------------------------------------


More information about the texhax mailing list