Re: What replaces gdk_text_extents() ?
- From: Owen Taylor <otaylor redhat com>
- To: Peter Krueger <pkrueger appss de>
- Cc: gtk-list gnome org
- Subject: Re: What replaces gdk_text_extents() ?
- Date: Fri, 15 Aug 2003 11:02:17 -0400
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]