[cairo] text measuring speed

Jon Smirl jonsmirl at gmail.com
Sat Jun 11 08:29:45 PDT 2005

On 6/11/05, Keith Packard <keithp at keithp.com> wrote:
> On Fri, 2005-06-10 at 22:24 -0400, Jon Smirl wrote:
> > I haven't really be following all of this, but why are you always
> > measuring one glyph extent at a time? If you measure strings
> > freetype/pango will take into account kerning pairs allowed by the
> > truetype font. With kerning pairs the sum of the individual glyph
> > extents won't equal the extent of the string.
> This code lives beneath pango, which is precisely why I expect to see
> requests to measure a single glyph at a time.

I've always been confused about why Cairo is involved with text at
all, but I haven't been following the Cairo list in detail. Why
doesn't pango call freetype directly to get the extent of the kerned
string and then just hand Cairo a grayscale/alpha bitmap? What is
gained by having a text extent function in Cairo? If this explained
somewhere tell me and I'll go read it.

Jon Smirl
jonsmirl at gmail.com

More information about the cairo mailing list