Mercurial > emacs
changeset 90542:2be199f501f8
(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.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Mon, 24 Jul 2006 04:44:13 +0000 |
parents | b7130e76c2f9 |
children | 4a80a8a200ba |
files | src/font.h |
diffstat | 1 files changed, 12 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/font.h Mon Jul 24 04:42:53 2006 +0000 +++ b/src/font.h Mon Jul 24 04:44:13 2006 +0000 @@ -255,21 +255,25 @@ #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 @@ 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));