[cairo] Early Initialization?

Behdad Esfahbod behdad at behdad.org
Wed Mar 14 11:04:19 PDT 2007


On Wed, 2007-03-14 at 14:02 -0400, Behdad Esfahbod wrote:
> On Wed, 2007-03-14 at 13:09 -0400, Carl Worth wrote:
> > On Wed, 14 Mar 2007 16:05:08 +0100, Murray Cumming wrote:
> > > I wonder, is there any Cairo initialization that we can do at that time?
> > > For GTK+ 2.6 maemo-launcher initialized Xft, so maybe there's an
> > > equivalent for GTK+ 2.10.
> > 
> > With GTK+ 2.10, cairo does replace Xft, and there's probably some
> > non-trivial application startup time to be saved there, (I'm thinking
> > of fontconfig initialization).
> > 
> > But I don't know what would be the right sequence of cairo calls to
> > make to force that, (we don't have anything like cairo_init, and even
> > cairo_create;cairo_destroy is optimized for lazy creation of fonts and
> > such, so that wouldn't even help).
> > 
> > Maybe all you need is a call to cairo_font_extents() ?
> > 
> > Anyone else have some better suggestion here?
> 
> Create an image surface and render something in the default language and
> default font ("Sans"?) to it using pangocairo.

For extra, do it for all font-descriptions that your UI uses (all
"default" font face+size combinations).

> I wanted to say create an X pixmap, but I figure the launcher has to
> close the display and reopen it...
> 
> > -Carl
> 
-- 
behdad
http://behdad.org/

"Those who would give up Essential Liberty to purchase a little
 Temporary Safety, deserve neither Liberty nor Safety."
        -- Benjamin Franklin, 1759





More information about the cairo mailing list