changeset 89723:7d1daf16ade9

(x_compute_glyph_string_overhangs): Handle also a composition glyph.
author Kenichi Handa <handa@m17n.org>
date Fri, 23 Jan 2004 08:44:57 +0000
parents eee9d99444cc
children 00f3a7dc3a28
files src/xterm.c
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/xterm.c	Fri Jan 23 08:43:36 2004 +0000
+++ b/src/xterm.c	Fri Jan 23 08:44:57 2004 +0000
@@ -1126,8 +1126,7 @@
 
 
 /* RIF:
-   Compute left and right overhang of glyph string S.  If S is a glyph
-   string for a composition, assume overhangs don't exist.  */
+   Compute left and right overhang of glyph string S.  */
 
 static void
 x_compute_glyph_string_overhangs (s)
@@ -1143,6 +1142,11 @@
       s->right_overhang = cs.rbearing > cs.width ? cs.rbearing - cs.width : 0;
       s->left_overhang = cs.lbearing < 0 ? -cs.lbearing : 0;
     }
+  else if (s->cmp)
+    {
+      s->right_overhang = s->cmp->rbearing - s->cmp->pixel_width;
+      s->left_overhang = - s->cmp->lbearing;
+    }
 }