changeset 90531:a4a30dc43165

(LGLYPH_XOFF, LGLYPH_YOFF, LGLYPH_WIDTH, LGLYPH_WADJUST) (LGLYPH_SET_WIDTH): Adjusted for the change of LGLYPH format. (LGLYPH_ADJUSTMENT, LGLYPH_SET_ADJUSTMENT): New macros.
author Kenichi Handa <handa@m17n.org>
date Fri, 14 Jul 2006 02:25:31 +0000
parents 76d717f9ceda
children e22cf6d2400c
files src/font.h
diffstat 1 files changed, 11 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/font.h	Fri Jul 14 02:24:13 2006 +0000
+++ b/src/font.h	Fri Jul 14 02:25:31 2006 +0000
@@ -257,16 +257,19 @@
 
 #define LGLYPH_CHAR(g) AREF ((g), 2)
 #define LGLYPH_CODE(g) AREF ((g), 3)
-#define LGLYPH_XOFF(g) AREF ((g), 4)
-#define LGLYPH_YOFF(g) AREF ((g), 5)
-#define LGLYPH_WIDTH(g) AREF ((g), 6)
-#define LGLYPH_WADJUST(g) AREF ((g), 7)
+#define LGLYPH_WIDTH(g) AREF ((g), 4)
+#define LGLYPH_ADJUSTMENT(g) AREF ((g), 5)
 #define LGLYPH_SET_CHAR(g, val) ASET ((g), 2, (val))
 #define LGLYPH_SET_CODE(g, val) ASET ((g), 3, (val))
-#define LGLYPH_SET_XOFF(g, val) ASET ((g), 4, (val))
-#define LGLYPH_SET_YOFF(g, val) ASET ((g), 5, (val))
-#define LGLYPH_SET_WIDTH(g, val) ASET ((g), 6, (val))
-#define LGLYPH_SET_WADJUST(g, val) ASET ((g), 7, (val))
+#define LGLYPH_SET_WIDTH(g, val) ASET ((g), 4, (val))
+#define LGLYPH_SET_ADJUSTMENT(g, val) ASET ((g), 5, (val))
+
+#define LGLYPH_XOFF(g) (NILP (LGLYPH_ADJUSTMENT (g)) ? 0 \
+			: XINT (AREF (LGLYPH_ADJUSTMENT (g), 0)))
+#define LGLYPH_YOFF(g) (NILP (LGLYPH_ADJUSTMENT (g)) ? 0 \
+			: XINT (AREF (LGLYPH_ADJUSTMENT (g), 1)))
+#define LGLYPH_WADJUST(g) (NILP (LGLYPH_ADJUSTMENT (g)) ? 0 \
+			   : XINT (AREF (LGLYPH_ADJUSTMENT (g), 2)))
 
 #define FONT_INVALID_CODE 0xFFFFFFFF