What replaces gdk_text_extents() ?

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

 



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?

Regards...Peter
-- 
====================================================================
Peter Krüger

applied software solutions (appss) GmbH
Sandtorstr. 23
D-39106 Magdeburg
Germany

Phone:  +49-(0)391-54486-19388
Fax:    +49-(0)391-54486-19222
email:  krueger@xxxxxxxx
URL:    http://www.appss.de

Managing Director: Uwe Hess, Dietmar Schäfer
Register: HRB12386, AG Mageburg

"Virtual business becomes reality!"

This e-mail may contain confidential and/or privileged information. If
you are not the intended recipient (or have received this e-mail in
error) please notify the sender immediately and destroy this e-mail. Any
unauthorised copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.
====================================================================

_______________________________________________

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