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

List:       cairo
Subject:    Re: [cairo] Cairo 1.9.2 performance
From:       cu <cairouser () yahoo ! com>
Date:       2009-06-18 12:49:02
Message-ID: 4A3A37BE.10303 () yahoo ! com
[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. 
>   
Since the "toy" designation was removed from the font API calls, I am
not entirely sure why it is now less recommended for use than before.
Using Pango (or any other additional API for that matter) would make our
application even less portable and, in any case, is a significant
overkill for the text functionality we need, so that's not really an
option.
> 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().
>   
I will make a note of that and test this approach at some point.

What is the reason for this change of text API behavior? I don't suppose
the slow-down is intentional?


_______________________________________________
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