aboutsummaryrefslogtreecommitdiffstats
path: root/src/xftfont.c
diff options
context:
space:
mode:
authorJuanma Barranquero2010-10-19 13:44:07 +0200
committerJuanma Barranquero2010-10-19 13:44:07 +0200
commitca3fa30248b923c17c021c0fcdb945271d14e8c2 (patch)
tree8283b1da72c771a21410f5fe621d3a299fe66b53 /src/xftfont.c
parent3224b54d5cc5964af5e6509579fd942eae04f1d1 (diff)
parentbca0f839a56a1edd8562ada5962b809323f39efc (diff)
downloademacs-ca3fa30248b923c17c021c0fcdb945271d14e8c2.tar.gz
emacs-ca3fa30248b923c17c021c0fcdb945271d14e8c2.zip
Merge changes from emacs-23 branch.
Diffstat (limited to 'src/xftfont.c')
-rw-r--r--src/xftfont.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/xftfont.c b/src/xftfont.c
index dc82c28b215..a44921a11df 100644
--- a/src/xftfont.c
+++ b/src/xftfont.c
@@ -32,6 +32,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
32#include "blockinput.h" 32#include "blockinput.h"
33#include "character.h" 33#include "character.h"
34#include "charset.h" 34#include "charset.h"
35#include "composite.h"
35#include "fontset.h" 36#include "fontset.h"
36#include "font.h" 37#include "font.h"
37#include "ftfont.h" 38#include "ftfont.h"
@@ -664,6 +665,23 @@ xftfont_draw (struct glyph_string *s, int from, int to, int x, int y, int with_b
664 return len; 665 return len;
665} 666}
666 667
668Lisp_Object
669xftfont_shape (Lisp_Object lgstring)
670{
671 struct font *font;
672 struct xftfont_info *xftfont_info;
673 FT_Face ft_face;
674 Lisp_Object val;
675
676 CHECK_FONT_GET_OBJECT (LGSTRING_FONT (lgstring), font);
677 xftfont_info = (struct xftfont_info *) font;
678 ft_face = XftLockFace (xftfont_info->xftfont);
679 xftfont_info->ft_size = ft_face->size;
680 val = ftfont_driver.shape (lgstring);
681 XftUnlockFace (xftfont_info->xftfont);
682 return val;
683}
684
667static int 685static int
668xftfont_end_for_frame (FRAME_PTR f) 686xftfont_end_for_frame (FRAME_PTR f)
669{ 687{
@@ -753,6 +771,9 @@ syms_of_xftfont (void)
753 xftfont_driver.draw = xftfont_draw; 771 xftfont_driver.draw = xftfont_draw;
754 xftfont_driver.end_for_frame = xftfont_end_for_frame; 772 xftfont_driver.end_for_frame = xftfont_end_for_frame;
755 xftfont_driver.cached_font_ok = xftfont_cached_font_ok; 773 xftfont_driver.cached_font_ok = xftfont_cached_font_ok;
774#if defined (HAVE_M17N_FLT) && defined (HAVE_LIBOTF)
775 xftfont_driver.shape = xftfont_shape;
776#endif
756 777
757 register_font_driver (&xftfont_driver, NULL); 778 register_font_driver (&xftfont_driver, NULL);
758} 779}