Re: text size in pango



On Wed, May 07, 2003 at 02:08:06AM +0200, Fritz Ganter wrote:
I draw my text with gdk_draw_layout_with_colors, but need to know the
size of the string. In GTK-1.2 I did this with
k = gdk_text_width (smalltextfont, txt, strlen (txt));
I need the same in pango, to draw a box around it and to position the
text on the graphic.

Look at the "Text Handling in GTK 2" section of
http://developer.gnome.org/dotplan/porting/

(shamelessly copied from Havoc's post a week ago :P)

-- 
      Evan Martin
martine cs washington edu
  http://neugierig.org



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