Re: text size in pango
- From: Fritz Ganter <ganter ganter at>
- To: gtk-app-devel-list <gtk-app-devel-list gnome org>
- Subject: Re: text size in pango
- Date: 07 May 2003 10:50:51 +0200
Am Mit, 2003-05-07 um 07.23 schrieb Evan Martin:
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/
I read it, but can't find the functions:
If found here
When asking for text metrics, such as the size of a PangoLayout, you'll
notice that all Pango objects have a "logical size" and an "ink size."
The logical size corresponds to the font metrics (ascent and descent),
and should be used to position text. The logical size for a line of
text...blablub
But with which function to use?
People, GTK2 is really cool, but documentation of this pango stuff is
poor.
3 lines of example code would save hours of searching for docu. In
gtk-demo is nothing about it.
--
Fritz "der mit dem Linux tanzt" Ganter http://www.kraftvoll.at
Key fingerprint = 555A DDBB 3985 16FF CD41 2031 C485 1783 BF34 728F
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]