Mercurial > emacs
changeset 96431:abddf0a4cec0
(xftfont_open): Don't call FcConfigSubstitute and
XftDefaultSubstitute (they are called in XftFontMatch).
(xftfont_open): Fix args to ftfont_font_format.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Mon, 30 Jun 2008 07:40:40 +0000 |
parents | cd7f2304ab28 |
children | 3dc335bd8a91 |
files | src/xftfont.c |
diffstat | 1 files changed, 4 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/xftfont.c Mon Jun 30 07:39:14 2008 +0000 +++ b/src/xftfont.c Mon Jun 30 07:40:40 2008 +0000 @@ -175,7 +175,7 @@ return entity; } -extern Lisp_Object ftfont_font_format P_ ((FcPattern *)); +extern Lisp_Object ftfont_font_format P_ ((FcPattern *, Lisp_Object)); extern Lisp_Object QCantialias; static FcChar8 ascii_printable[95]; @@ -209,7 +209,6 @@ if (size == 0) size = pixel_size; pat = FcPatternCreate (); - FcPatternAddString (pat, FC_FILE, (FcChar8 *) SDATA (filename)); FcPatternAddInteger (pat, FC_WEIGHT, FONT_WEIGHT_NUMERIC (entity)); i = FONT_SLANT_NUMERIC (entity) - 100; if (i < 0) i = 0; @@ -262,12 +261,12 @@ FcPatternAddBool (pat, FC_EMBOLDEN, NILP (val) ? FcFalse : FcTrue); #endif } - FcConfigSubstitute (NULL, pat, FcMatchPattern); BLOCK_INPUT; - XftDefaultSubstitute (display, FRAME_X_SCREEN_NUMBER (f), pat); match = XftFontMatch (display, FRAME_X_SCREEN_NUMBER (f), pat, &result); FcPatternDestroy (pat); + FcPatternDel (match, FC_FILE); + FcPatternAddString (match, FC_FILE, (FcChar8 *) SDATA (filename)); xftfont = XftFontOpenPattern (display, match); UNBLOCK_INPUT; @@ -291,7 +290,7 @@ AREF (font_object, FONT_NAME_INDEX)); ASET (font_object, FONT_FILE_INDEX, filename); ASET (font_object, FONT_FORMAT_INDEX, - ftfont_font_format (xftfont->pattern)); + ftfont_font_format (xftfont->pattern, filename)); font = XFONT_OBJECT (font_object); font->pixel_size = pixel_size; font->driver = &xftfont_driver;