Re: What replaces gdk_text_extents() ?

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

 



On Fri, 2003-08-15 at 10:31, Peter Krueger wrote:
> Hi,
> I'm wondering what functions I should use in GTK 2.2.2 to calculate the
> size of some text. I need this information for instance for calculating
> the position of some text that I want to draw inside a GtkDrawingArea.
> The mailing list archive and tutorial / API documentation doesn't seem to
> have an answer to this question (or at least I didn't find it).
> All I found is that everything relating to GdkFont is now deprecated, but
> there are no hints what could be used instead.
> As far as I understand the font of a widget will be specified now by a
> PangoFontDescription like this:
>   PangoFontDescription *font_desc = pango_font_description_from_string(
>     szFontName);
>   gtk_widget_modify_font(pGTKLabel, font_desc);
> 
> So how do I get the ascent, descent and width of some "gchar*"-text
> before it is actually displayed using a given PangoFontDescription?

See questions 1.11 and 1.12 in

  http://developer.gnome.org/doc/API/2.0/gtk/gtk-question-index.html

Regards,
						Owen


_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux