Re: Howto use a GdkFont in Cairo?



Hi Mathias,

Thanks a lot for your help.

> GdkFont is from a very old era, predating inovations like Xft, Pango or
> cairo. Most propably you want to use
> pango_cairo_show_layout_line() and friends.
The problem is that I am working on a cairo-only GtkStyle interface,
as far as I see GTK internally deals only with GdkFont like the
following:

 if (state_type == GTK_STATE_INSENSITIVE)
    gdk_draw_string (window,
		     gtk_style_get_font_internal (style),
		     style->white_gc, x + 1, y + 1, string);

To not be forced to make too many changes outside of the scope of my
"project", it would be really great if I somehow could use the GdkFont
from Cairo.
Looking it up by its name every call is most likely quite slow :-/

Any ideas how the font-information could be transferred in good manner?

Thank you in advance, lg Clemens


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