From: Kenichi Handa Date: Thu, 28 Feb 2008 12:54:46 +0000 (+0000) Subject: (ftfont_match): Explicitly set pixelsize in pattern. X-Git-Tag: emacs-pretest-23.0.90~7596 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=550826426fa22f6a8a9f2a02e2a40dee89f8b819;p=emacs.git (ftfont_match): Explicitly set pixelsize in pattern. --- diff --git a/src/ChangeLog b/src/ChangeLog index 0dc4447a971..9f3b1d31a3b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2008-02-28 Kenichi Handa + * ftfont.c (ftfont_match): Explicitly set pixelsize in pattern. + * xdisp.c (display_mode_element): Cancel the previous change. (decode_mode_spec): Likewise. (handle_auto_composed_prop): Don't make composition if it->string diff --git a/src/ftfont.c b/src/ftfont.c index 2a72316b6a9..834c4a6f07c 100644 --- a/src/ftfont.c +++ b/src/ftfont.c @@ -710,6 +710,14 @@ ftfont_match (frame, spec) pattern = FcNameParse (SDATA (XCDR (val))); if (pattern) { + if (INTEGERP (AREF (spec, FONT_SIZE_INDEX))) + { + FcValue value; + + value.type = FcTypeDouble; + value.u.d = XINT (AREF (spec, FONT_SIZE_INDEX)); + FcPatternAdd (pattern, FC_PIXEL_SIZE, value, FcFalse); + } if (FcConfigSubstitute (NULL, pattern, FcMatchPattern) == FcTrue) { FcDefaultSubstitute (pattern);