freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft] Glyph metrics.


From: Werner LEMBERG
Subject: Re: [ft] Glyph metrics.
Date: Mon, 03 Aug 2009 13:36:38 +0200 (CEST)

> For a given glyph, how do I tell how far above and below the
> base-line it extends.

To get exact values you have to compute the bounding box.

> It is not clear how to determine these numbers from the various
> glyph metrics; horiBearingX, horiBearingY etc.

The glyph metrics have no real connection to the actual dimensions of
the glyph shape.  Sometimes, they differ intentionally; for example,
an italic `f' shape often has a smaller horizontal advance width then
you would expect.  In other words, the upper right part of the glyph
sticks out horizontally of the width given by the font metrics.

Chapter III of the `FreeType Glyph Conventions' (available from
www.freetype.org) gives a good overview of the various parameters.
This guide is quite old, and there is a high chance that some details
are inaccurate, wrong, or no longer valid (patches highly welcomed!),
but for a first look it should be sufficient.


    Werner




reply via email to

[Prev in Thread] Current Thread [Next in Thread]