summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>1998-12-12 22:21:48 +0000
committerOwen Taylor <otaylor@src.gnome.org>1998-12-12 22:21:48 +0000
commit823b4d43a137e1afc66c53ef2d063568c5f581ea (patch)
tree6cada4fa3ea0a834ebb3095baec550ef0a5cbee6
parent11a8051179a2a411a2a332f7128ae188d7e3bd93 (diff)
downloadgtk+-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>)
-rw-r--r--ChangeLog7
-rw-r--r--ChangeLog.pre-2-07
-rw-r--r--ChangeLog.pre-2-107
-rw-r--r--ChangeLog.pre-2-27
-rw-r--r--ChangeLog.pre-2-47
-rw-r--r--ChangeLog.pre-2-67
-rw-r--r--ChangeLog.pre-2-87
-rw-r--r--gdk/gdkfont.c8
-rw-r--r--gdk/x11/gdkfont-x11.c8
9 files changed, 57 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 83360af656..3a718d560f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+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>)
+
Fri Dec 11 08:59:12 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtklistitem.c (gtk_list_item_style_set):
diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0
index 83360af656..3a718d560f 100644
--- a/ChangeLog.pre-2-0
+++ b/ChangeLog.pre-2-0
@@ -1,3 +1,10 @@
+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>)
+
Fri Dec 11 08:59:12 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtklistitem.c (gtk_list_item_style_set):
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 83360af656..3a718d560f 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,10 @@
+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>)
+
Fri Dec 11 08:59:12 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtklistitem.c (gtk_list_item_style_set):
diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2
index 83360af656..3a718d560f 100644
--- a/ChangeLog.pre-2-2
+++ b/ChangeLog.pre-2-2
@@ -1,3 +1,10 @@
+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>)
+
Fri Dec 11 08:59:12 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtklistitem.c (gtk_list_item_style_set):
diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4
index 83360af656..3a718d560f 100644
--- a/ChangeLog.pre-2-4
+++ b/ChangeLog.pre-2-4
@@ -1,3 +1,10 @@
+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>)
+
Fri Dec 11 08:59:12 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtklistitem.c (gtk_list_item_style_set):
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index 83360af656..3a718d560f 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,3 +1,10 @@
+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>)
+
Fri Dec 11 08:59:12 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtklistitem.c (gtk_list_item_style_set):
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index 83360af656..3a718d560f 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,10 @@
+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>)
+
Fri Dec 11 08:59:12 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtklistitem.c (gtk_list_item_style_set):
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;
}
diff --git a/gdk/x11/gdkfont-x11.c b/gdk/x11/gdkfont-x11.c
index 0308fa8e0d..094be0c41b 100644
--- a/gdk/x11/gdkfont-x11.c
+++ b/gdk/x11/gdkfont-x11.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;
}