[cairo] text measuring speed

Owen Taylor otaylor at redhat.com
Sat Jun 11 09:19:16 PDT 2005


On Sat, 2005-06-11 at 12:27 -0400, Jon Smirl wrote:
> On 6/11/05, Jon Smirl <jonsmirl at gmail.com> wrote:
> > On 6/11/05, Owen Taylor <otaylor at redhat.com> wrote:
> > > How would you propose rendering to a PDF file or using native fonts
> > > on Win32 without having Cairo involved in font handling?
> > 
> > Pango would replace freetype with an equivalent for PDF/Win32 on these
> > platforms?
> 
> Ok, if I understand correctly Pango has replaced freetype with an
> equivalent for PDF/Win32 on these platforms. The replacement lives in
> Cairo. That allows it to share the font cache with the render stage.
> So pango doesn't call freetype directly any more, it instead calls
> Cairo which passes the calls out to freetype/PDF/win32/etc. Right?

Not really. For PDF, we are using FreeType on Linux/Unix ...but the
point is that the PDF backend for Cairo needs to have access to the
font data in order to subset the font and embed it into the PDF file.

Fonts are shared resources between Pango and Cairo ... Cairo handles
the rendering, Pango handles the layout. Since finding out the extents
of a glyph is very closely related to rendering that glyph, that is
also handled by Cairo.

> But pango deals with kerned strings generated by
> freetype/PDF/win32/etc right? Not individual glyphs.
> 
> So back to my initial question, why does Keith care about the speed of
> GetTextExt() on a single glyph if pango is deals in kerned strings?

Because Pango has to find out the size of the single glyphs when it
is kerning the strings...

Regards,
						Owen

-------------- 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/ffa19498/attachment.pgp


More information about the cairo mailing list