summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJuanma Barranquero <lekktu@gmail.com>2010-10-19 13:44:07 +0200
committerJuanma Barranquero <lekktu@gmail.com>2010-10-19 13:44:07 +0200
commitca3fa30248b923c17c021c0fcdb945271d14e8c2 (patch)
tree8283b1da72c771a21410f5fe621d3a299fe66b53 /src
parent3224b54d5cc5964af5e6509579fd942eae04f1d1 (diff)
parentbca0f839a56a1edd8562ada5962b809323f39efc (diff)
Merge changes from emacs-23 branch.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog13
-rw-r--r--src/s/cygwin.h3
-rw-r--r--src/xftfont.c21
3 files changed, 37 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 7046d13262f..c9d0e80c12f 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,16 @@
+2010-10-19 Ken Brown <kbrown@cornell.edu>
+
+ * s/cygwin.h (SIGNALS_VIA_CHARACTERS): New define (bug#7225).
+
+2010-10-19 Kenichi Handa <handa@m17n.org>
+
+ 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-18 Julien Danjou <julien@danjou.info>
* frame.c (Fframe_pointer_visible_p):
diff --git a/src/s/cygwin.h b/src/s/cygwin.h
index 4d58542e660..157ef72f550 100644
--- a/src/s/cygwin.h
+++ b/src/s/cygwin.h
@@ -101,5 +101,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
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
+
/* arch-tag: 5ae7ba00-83b0-4ab3-806a-3e845779191b
(do not change this comment) */
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/>. */
#include "blockinput.h"
#include "character.h"
#include "charset.h"
+#include "composite.h"
#include "fontset.h"
#include "font.h"
#include "ftfont.h"
@@ -664,6 +665,23 @@ xftfont_draw (struct glyph_string *s, int from, int to, int x, int y, int with_b
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 (FRAME_PTR f)
{
@@ -753,6 +771,9 @@ syms_of_xftfont (void)
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);
}