changeset 90529:66074f6b42c3

(x_draw_composite_glyph_string_foreground): Adjusted for the change of LGLYPH format.
author Kenichi Handa <handa@m17n.org>
date Fri, 14 Jul 2006 02:22:51 +0000
parents ef5f7f9076e5
children 76d717f9ceda
files src/xterm.c
diffstat 1 files changed, 10 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/xterm.c	Sun Jul 09 10:57:05 2006 +0000
+++ b/src/xterm.c	Fri Jul 14 02:22:51 2006 +0000
@@ -1466,9 +1466,10 @@
 	  for (i = from = 0; i < s->nchars; i++)
 	    {
 	      Lisp_Object g = LGSTRING_GLYPH (gstring, i);
-
-	      if (XINT (LGLYPH_XOFF (4)) == 0 && XINT (LGLYPH_YOFF (g)) == 0
-		  && XINT (LGLYPH_WADJUST (g)) == 0)
+	      Lisp_Object adjustment = LGLYPH_ADJUSTMENT (g);
+	      int xoff, yoff, wadjust;
+
+	      if (NILP (adjustment))
 		{
 		  width += XINT (LGLYPH_WIDTH (g));
 		  continue;
@@ -1478,11 +1479,12 @@
 		  font->driver->draw (s, from, i, x, y, 0);
 		  x += width;
 		}
-	      font->driver->draw (s, i, i + 1,
-				  x + XINT (LGLYPH_XOFF (g)),
-				  y + XINT (LGLYPH_XOFF (g)),
-				  0);
-	      x += XINT (LGLYPH_WIDTH (g)) + XINT (LGLYPH_WADJUST (g));
+	      xoff = XINT (AREF (adjustment, 0));
+	      yoff = XINT (AREF (adjustment, 1));
+	      wadjust = XINT (AREF (adjustment, 2));
+
+	      font->driver->draw (s, i, i + 1, x + xoff, y + yoff, 0);
+	      x += XINT (LGLYPH_WIDTH (g)) + wadjust;
 	      from = i + 1;
 	      width = 0;
 	    }