Mercurial > emacs
comparison src/xftfont.c @ 101640:6a674ba1901f
(xftfont_has_char): New function.
(syms_of_xftfont): Register xftfont_has_char in xftfont_driver.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Thu, 29 Jan 2009 12:13:47 +0000 |
parents | a8e049b0d2c2 |
children | 97c9e9322753 |
comparison
equal
deleted
inserted
replaced
101639:789d88174e93 | 101640:6a674ba1901f |
---|---|
142 static Lisp_Object xftfont_match P_ ((Lisp_Object, Lisp_Object)); | 142 static Lisp_Object xftfont_match P_ ((Lisp_Object, Lisp_Object)); |
143 static Lisp_Object xftfont_open P_ ((FRAME_PTR, Lisp_Object, int)); | 143 static Lisp_Object xftfont_open P_ ((FRAME_PTR, Lisp_Object, int)); |
144 static void xftfont_close P_ ((FRAME_PTR, struct font *)); | 144 static void xftfont_close P_ ((FRAME_PTR, struct font *)); |
145 static int xftfont_prepare_face P_ ((FRAME_PTR, struct face *)); | 145 static int xftfont_prepare_face P_ ((FRAME_PTR, struct face *)); |
146 static void xftfont_done_face P_ ((FRAME_PTR, struct face *)); | 146 static void xftfont_done_face P_ ((FRAME_PTR, struct face *)); |
147 static int xftfont_has_char P_ ((Lisp_Object, int)); | |
147 static unsigned xftfont_encode_char P_ ((struct font *, int)); | 148 static unsigned xftfont_encode_char P_ ((struct font *, int)); |
148 static int xftfont_text_extents P_ ((struct font *, unsigned *, int, | 149 static int xftfont_text_extents P_ ((struct font *, unsigned *, int, |
149 struct font_metrics *)); | 150 struct font_metrics *)); |
150 static int xftfont_draw P_ ((struct glyph_string *, int, int, int, int, int)); | 151 static int xftfont_draw P_ ((struct glyph_string *, int, int, int, int, int)); |
151 static int xftfont_end_for_frame P_ ((FRAME_PTR f)); | 152 static int xftfont_end_for_frame P_ ((FRAME_PTR f)); |
464 free (xftface_info); | 465 free (xftface_info); |
465 face->extra = NULL; | 466 face->extra = NULL; |
466 } | 467 } |
467 } | 468 } |
468 | 469 |
470 static int | |
471 xftfont_has_char (font, c) | |
472 Lisp_Object font; | |
473 int c; | |
474 { | |
475 struct xftfont_info *xftfont_info; | |
476 | |
477 if (FONT_ENTITY_P (font)) | |
478 return ftfont_driver.has_char (font, c); | |
479 | |
480 xftfont_info = (struct xftfont_info *) XFONT_OBJECT (font); | |
481 return (XftCharExists (xftfont_info->display, xftfont_info->xftfont, | |
482 (FcChar32) c) == FcTrue); | |
483 } | |
484 | |
469 static unsigned | 485 static unsigned |
470 xftfont_encode_char (font, c) | 486 xftfont_encode_char (font, c) |
471 struct font *font; | 487 struct font *font; |
472 int c; | 488 int c; |
473 { | 489 { |
602 xftfont_driver.match = xftfont_match; | 618 xftfont_driver.match = xftfont_match; |
603 xftfont_driver.open = xftfont_open; | 619 xftfont_driver.open = xftfont_open; |
604 xftfont_driver.close = xftfont_close; | 620 xftfont_driver.close = xftfont_close; |
605 xftfont_driver.prepare_face = xftfont_prepare_face; | 621 xftfont_driver.prepare_face = xftfont_prepare_face; |
606 xftfont_driver.done_face = xftfont_done_face; | 622 xftfont_driver.done_face = xftfont_done_face; |
623 xftfont_driver.has_char = xftfont_has_char; | |
607 xftfont_driver.encode_char = xftfont_encode_char; | 624 xftfont_driver.encode_char = xftfont_encode_char; |
608 xftfont_driver.text_extents = xftfont_text_extents; | 625 xftfont_driver.text_extents = xftfont_text_extents; |
609 xftfont_driver.draw = xftfont_draw; | 626 xftfont_driver.draw = xftfont_draw; |
610 xftfont_driver.end_for_frame = xftfont_end_for_frame; | 627 xftfont_driver.end_for_frame = xftfont_end_for_frame; |
611 | 628 |