# HG changeset patch # User Kenichi Handa # Date 1260583889 0 # Node ID 500878bee91d1d0b25e10a39a4ffdc4f5832d1f4 # Parent 9a13ceca63a831cb259f85f1ed174da77a18da20 (struct xftfont_info): New member matrix. (xftfont_open): Setup xftfont_info->matrix. diff -r 9a13ceca63a8 -r 500878bee91d src/xftfont.c --- a/src/xftfont.c Fri Dec 11 20:48:03 2009 +0000 +++ b/src/xftfont.c Sat Dec 12 02:11:29 2009 +0000 @@ -47,7 +47,7 @@ struct xftfont_info { struct font font; - /* The following four members must be here in this order to be + /* The following five members must be here in this order to be compatible with struct ftfont_info (in ftfont.c). */ #ifdef HAVE_LIBOTF int maybe_otf; /* Flag to tell if this may be OTF or not. */ @@ -55,6 +55,7 @@ #endif /* HAVE_LIBOTF */ FT_Size ft_size; int index; + FT_Matrix matrix; Display *display; int screen; XftFont *xftfont; @@ -254,6 +255,7 @@ int len, i; XGlyphInfo extents; FT_Face ft_face; + FcMatrix *matrix; val = assq_no_quit (QCfont_entity, AREF (entity, FONT_EXTRA_INDEX)); if (! CONSP (val)) @@ -378,6 +380,16 @@ xftfont_info->display = display; xftfont_info->screen = FRAME_X_SCREEN_NUMBER (f); xftfont_info->xftfont = xftfont; + /* This means that there's no need of transformation. */ + xftfont_info->matrix.xx = 0; + if (FcPatternGetMatrix (xftfont->pattern, FC_MATRIX, 0, &matrix) + == FcResultMatch) + { + xftfont_info->matrix.xx = 0x10000L * matrix->xx; + xftfont_info->matrix.yy = 0x10000L * matrix->yy; + xftfont_info->matrix.xy = 0x10000L * matrix->xy; + xftfont_info->matrix.yx = 0x10000L * matrix->yx; + } font->pixel_size = size; font->driver = &xftfont_driver; if (INTEGERP (AREF (entity, FONT_SPACING_INDEX)))