changeset 89725:39563e1a1b64

(COMPOSITION_DECODE_RULE): New arg xoff and yoff. (struct composition): New member lbearing and rbearing.
author Kenichi Handa <handa@m17n.org>
date Fri, 23 Jan 2004 08:48:19 +0000
parents 00f3a7dc3a28
children 2660b0974edb
files src/composite.h
diffstat 1 files changed, 15 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/composite.h	Fri Jan 23 08:47:18 2004 +0000
+++ b/src/composite.h	Fri Jan 23 08:48:19 2004 +0000
@@ -127,13 +127,19 @@
 	->contents[(n) * 2 - 1])
 
 /* Decode encoded composition rule RULE_CODE into GREF (global
-   reference point code) and NREF (new reference point code).  Don't
-   check RULE_CODE, always set GREF and NREF to valid values.  */
-#define COMPOSITION_DECODE_RULE(rule_code, gref, nref)	\
-  do {							\
-    gref = (rule_code) / 12;				\
-    if (gref > 12) gref = 11;				\
-    nref = (rule_code) % 12;				\
+   reference point code), NREF (new reference point code), XOFF
+   (horizontal offset) YOFF (vertical offset).  Don't check RULE_CODE,
+   always set GREF and NREF to valid values.  By side effect,
+   RULE_CODE is modified.  */
+
+#define COMPOSITION_DECODE_RULE(rule_code, gref, nref, xoff, yoff)	\
+  do {									\
+    xoff = (rule_code) >> 16;						\
+    yoff = ((rule_code) >> 8) & 0xFF;					\
+    rule_code &= 0xFF;							\
+    gref = (rule_code) / 12;						\
+    if (gref > 12) gref = 11;						\
+    nref = (rule_code) % 12;						\
   } while (0)
 
 /* Return encoded composition rule for the pair of global reference
@@ -160,6 +166,8 @@
   /* Width, ascent, and descent pixels of the composition.  */
   short pixel_width, ascent, descent;
 
+  short lbearing, rbearing;
+
   /* How many columns the overall glyphs occupy on the screen.  This
      gives an approximate value for column calculation in
      Fcurrent_column, and etc.  */