]> git.eshelyaron.com Git - emacs.git/commitdiff
(ftfont_match): Explicitly set pixelsize in pattern.
authorKenichi Handa <handa@m17n.org>
Thu, 28 Feb 2008 12:54:46 +0000 (12:54 +0000)
committerKenichi Handa <handa@m17n.org>
Thu, 28 Feb 2008 12:54:46 +0000 (12:54 +0000)
src/ChangeLog
src/ftfont.c

index 0dc4447a9717e80f0d835f5835aa2e9f668cf5fc..9f3b1d31a3bdca8e98f14be58d35570e6eb62ae9 100644 (file)
@@ -1,5 +1,7 @@
 2008-02-28  Kenichi Handa  <handa@ni.aist.go.jp>
 
+       * 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
index 2a72316b6a9a2f8963a13eabc7f0ceda57a2ccba..834c4a6f07c9c68648f2b5cd4cb07107fba0a222 100644 (file)
@@ -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);