[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cairo
Subject:    Re: [cairo] Cairo 1.9.2 performance
From:       David_Björkevik <david () bjorkevik ! se>
Date:       2009-06-18 12:55:59
Message-ID: 4A3A395F.907 () bjorkevik ! se
[Download RAW message or body]

Chris Wilson wrote:
> cairo_show_text() is the toy text interface interface, which now lazily
> resolves the font (if it has been changed on the context) on every call
> (since the resolved font can in fact change between calls). Consider
> this a strong hint not to use this in a non-demonstration application
> and use a full layout library like Pango instead. 
> 
> Alternatively you can always query the font chosen for a particular
> face, family, size, slant and weight by calling
> cairo_get_scaled_font(cr) after setting up the font parameters. Then to
> restore that particular resolved font, use cairo_set_scaled_font().
> 
> Did I mention use Pango?

I fully understand the philosophy of the "toy" API - it's a great way to
fight off bloating feature requests for more advanced text layout features.

However, the text api in cairo is good enough for many applications.
Telling the developers of those apps to include Pango (and GLib etc)
just for performance reasons isn't very nice IMHO. As others have
pointed out, adding Pango and Glib to an app has portability and
licensing issues.

/David
_______________________________________________
cairo mailing list
cairo@cairographics.org
http://lists.cairographics.org/mailman/listinfo/cairo
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic