From 31daa5e17c73c0830ef5094eb38702450965a938 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Fri, 15 Oct 2010 16:49:11 +0900 Subject: Fix incorrect font metrics when the same font is opened with different pixelsizes. --- src/ChangeLog | 9 +++++++++ src/xftfont.c | 21 +++++++++++++++++++++ 2 files changed, 30 insertions(+) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 40c0cb231e4..46913c8a8b0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2010-10-15 Kenichi Handa + + Fix incorrect font metrics when the same font is opened with + different pixelsizes. + + * xftfont.c: Include composite.h. + (xftfont_shape): New function. + (syms_of_xftfont): Set xftfont_driver.shape. + 2010-10-13 Damyan Pepper Fix handling of font properties on Windows (bug#6303). diff --git a/src/xftfont.c b/src/xftfont.c index 197cc9c1f5b..71fd1475280 100644 --- a/src/xftfont.c +++ b/src/xftfont.c @@ -32,6 +32,7 @@ along with GNU Emacs. If not, see . */ #include "blockinput.h" #include "character.h" #include "charset.h" +#include "composite.h" #include "fontset.h" #include "font.h" #include "ftfont.h" @@ -702,6 +703,23 @@ xftfont_draw (s, from, to, x, y, with_background) return len; } +Lisp_Object +xftfont_shape (Lisp_Object lgstring) +{ + struct font *font; + struct xftfont_info *xftfont_info; + FT_Face ft_face; + Lisp_Object val; + + CHECK_FONT_GET_OBJECT (LGSTRING_FONT (lgstring), font); + xftfont_info = (struct xftfont_info *) font; + ft_face = XftLockFace (xftfont_info->xftfont); + xftfont_info->ft_size = ft_face->size; + val = ftfont_driver.shape (lgstring); + XftUnlockFace (xftfont_info->xftfont); + return val; +} + static int xftfont_end_for_frame (f) FRAME_PTR f; @@ -796,6 +814,9 @@ syms_of_xftfont () xftfont_driver.draw = xftfont_draw; xftfont_driver.end_for_frame = xftfont_end_for_frame; xftfont_driver.cached_font_ok = xftfont_cached_font_ok; +#if defined (HAVE_M17N_FLT) && defined (HAVE_LIBOTF) + xftfont_driver.shape = xftfont_shape; +#endif register_font_driver (&xftfont_driver, NULL); } -- cgit v1.3 From 5419963b85522629c972baba98c7e2cfef4bb014 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Mon, 18 Oct 2010 08:23:41 -0400 Subject: * src/s/cygwin.h (SIGNALS_VIA_CHARACTERS): New define (bug#7225). --- src/ChangeLog | 4 ++++ src/s/cygwin.h | 3 +++ 2 files changed, 7 insertions(+) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 46913c8a8b0..d33f9dd4f0b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2010-10-18 Ken Brown + + * s/cygwin.h (SIGNALS_VIA_CHARACTERS): New define (bug#7225). + 2010-10-15 Kenichi Handa Fix incorrect font metrics when the same font is opened with diff --git a/src/s/cygwin.h b/src/s/cygwin.h index 9ca5c67ce37..dcab55a91e1 100644 --- a/src/s/cygwin.h +++ b/src/s/cygwin.h @@ -132,6 +132,9 @@ along with GNU Emacs. If not, see . */ returns ENOSYS. A workaround is to set G_SLICE=always-malloc. */ #define G_SLICE_ALWAYS_MALLOC +/* Send signals to subprocesses by "typing" special chars at them. */ +#define SIGNALS_VIA_CHARACTERS + /* the end */ /* arch-tag: 5ae7ba00-83b0-4ab3-806a-3e845779191b -- cgit v1.3