diff options
author | Owen Taylor <otaylor@redhat.com> | 1998-12-12 22:21:48 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 1998-12-12 22:21:48 +0000 |
commit | 823b4d43a137e1afc66c53ef2d063568c5f581ea (patch) | |
tree | 6cada4fa3ea0a834ebb3095baec550ef0a5cbee6 /gdk/gdkfont.c | |
parent | 11a8051179a2a411a2a332f7128ae188d7e3bd93 (diff) | |
download | gtk+-823b4d43a137e1afc66c53ef2d063568c5f581ea.tar.gz |
Corrections to computation of extents of text from a font set. (from
Sat Dec 12 17:18:32 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdkfont.c (gdk_text_extents): Corrections
to computation of extents of text from a font set.
(from Chi-Deok Hwang <cdhwang@sr.hei.co.kr>)
and Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>)
Diffstat (limited to 'gdk/gdkfont.c')
-rw-r--r-- | gdk/gdkfont.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gdk/gdkfont.c b/gdk/gdkfont.c index 0308fa8e0d..094be0c41b 100644 --- a/gdk/gdkfont.c +++ b/gdk/gdkfont.c @@ -489,15 +489,15 @@ gdk_text_extents (GdkFont *font, fontset = (XFontSet) private->xfont; XmbTextExtents (fontset, text, text_length, &ink, &logical); if (lbearing) - *lbearing = -ink.x; + *lbearing = ink.x; if (rbearing) - *rbearing = ink.y; + *rbearing = ink.x + ink.width; if (width) *width = logical.width; if (ascent) - *ascent = ink.height; + *ascent = -ink.y; if (descent) - *descent = -ink.y; + *descent = ink.y + ink.height; break; } |