[cairo] text measuring speed

Owen Taylor otaylor at redhat.com
Sat Jun 11 08:44:53 PDT 2005

On Sat, 2005-06-11 at 11:29 -0400, Jon Smirl wrote:
> 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.

How would you propose rendering to a PDF file or using native fonts
on Win32 without having Cairo involved in font handling? 

Even for RENDER, server side resources (cached glyphs) are managed
by Cairo and used at the rendering step to make rendering far more
efficient than if it was done just as bitmaps.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050611/45751841/attachment.pgp

More information about the cairo mailing list