Metric Information

Patrick Gundlach
Thu, 25 Jul 2002 10:04:29 +0200

Lars Hellström  <> writes:


> >And is this a general failing of UNIX systems:
> >how does Linux, for example handle post script fonts and the metrics
> >that go along with it?
> That would probably be the concern of the windowing system rather than the
> OS, but it would be interesting to hear an explanation of how this works.

Right the core OS (=any Unix kernel) has no idea what
a font is. The X11 windowing system has access to the fonts in the
system and can display them as well as provide some info to the
programmer: (The following has been found in the ref manual and not
used in practice, so this has to be taken with care)

The XCharStruct has info about the side bearings, height and depth (ascent
and descent) of characters in a font.

The XFontStruct has info about the writing direction, max. ascent, max
descent and "additional property" info:

The additional property info is quite interesting but probably not
used at all. It includes information about TeX-like glue, em, en, ex
dimensions, sub/superscript positioning, underline/strikeout
horizontal position and thickness.

I'll fade into the darkness