diff options
author | Kenichi Handa <handa@m17n.org> | 2006-07-24 04:44:13 +0000 |
---|---|---|
committer | Kenichi Handa <handa@m17n.org> | 2006-07-24 04:44:13 +0000 |
commit | 0bd4cc79df4c781897aecbc8de8b222e62099e41 (patch) | |
tree | 48457974862b3041b2062cee5aa1295a06880e69 /src/font.h | |
parent | 10d16101060a14542ce23344ef897d5b7ec81562 (diff) | |
download | emacs-0bd4cc79df4c781897aecbc8de8b222e62099e41.tar.gz |
(LGLYPH_FROM, LGLYPH_TO, LGLYPH_SET_FROM)
(LGLYPH_SET_TO): New macros.
(LGLYPH_XOFF, LGLYPH_YOFF, LGLYPH_WADJUST): Check if adjustment
element of G is vector or not.
(font_at): Extern it.
Diffstat (limited to 'src/font.h')
-rw-r--r-- | src/font.h | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/font.h b/src/font.h index 85f36d20872..019e12cfb80 100644 --- a/src/font.h +++ b/src/font.h @@ -255,21 +255,25 @@ struct composition; #define LGSTRING_LENGTH(lgs) (ASIZE ((lgs)) - 1) #define LGSTRING_GLYPH(lgs, idx) AREF ((lgs), (idx) + 1) +#define LGLYPH_FROM(g) AREF ((g), 0) +#define LGLYPH_TO(g) AREF ((g), 1) #define LGLYPH_CHAR(g) AREF ((g), 2) #define LGLYPH_CODE(g) AREF ((g), 3) #define LGLYPH_WIDTH(g) AREF ((g), 4) #define LGLYPH_ADJUSTMENT(g) AREF ((g), 5) +#define LGLYPH_SET_FROM(g, val) ASET ((g), 0, (val)) +#define LGLYPH_SET_TO(g, val) ASET ((g), 1, (val)) #define LGLYPH_SET_CHAR(g, val) ASET ((g), 2, (val)) #define LGLYPH_SET_CODE(g, val) ASET ((g), 3, (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 LGLYPH_XOFF(g) (VECTORP (LGLYPH_ADJUSTMENT (g)) \ + ? XINT (AREF (LGLYPH_ADJUSTMENT (g), 0)) : 0) +#define LGLYPH_YOFF(g) (VECTORP (LGLYPH_ADJUSTMENT (g)) \ + ? XINT (AREF (LGLYPH_ADJUSTMENT (g), 1)) : 0) +#define LGLYPH_WADJUST(g) (VECTORP (LGLYPH_ADJUSTMENT (g)) \ + ? XINT (AREF (LGLYPH_ADJUSTMENT (g), 2)) : 0) #define FONT_INVALID_CODE 0xFFFFFFFF @@ -470,6 +474,8 @@ extern int font_unparse_fcname P_ ((Lisp_Object font, int pixel_size, char *name, int bytes)); extern void register_font_driver P_ ((struct font_driver *driver, FRAME_PTR f)); extern void free_font_driver_list P_ ((FRAME_PTR f)); +extern Lisp_Object font_at P_ ((int c, EMACS_INT pos, struct face *face, + struct window *w, Lisp_Object object)); extern struct font *font_prepare_composition P_ ((struct composition *cmp)); |