Pango Text Rendering



Hi all,

I have a small app (written in Swing) which renders a bunch of Text on a
Canvas. I was hoping to use GTK for a similar task.  I have very limited
GTK+ (and Pango) experience, so this is probably something I'm doing wrong.


Using Swing I was able to render about 500,000 Hello, World strings in about
2 seconds (plus some VM Startup time). Using Pango, only 100,000 Hello,
World strings is taking about 15 seconds to complete.   I basically have:

for ( i = 0; i < 100000; i++ ) {
   gdk_draw_layout (GDK_DRAWABLE (window), gc, 0, 0, layout);
   gdk_flush ();
}

I understand that Pango can do a lot (internationalization, proper layout,
size, position, markup, etc...), however, for my InfoVis tool I just need it
to place labels at given co-ordinates. Is there a way to use a less feature
ritch Pango just to place text on a window?

- Ian



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]