changeset 92301:c10a8c811515

(ftfont_match): Explicitly set pixelsize in pattern.
author Kenichi Handa <handa@m17n.org>
date Thu, 28 Feb 2008 12:54:31 +0000
parents fc871dc6fc5c
children 6439b524d6a3
files src/ftfont.c
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/ftfont.c	Thu Feb 28 10:13:26 2008 +0000
+++ b/src/ftfont.c	Thu Feb 28 12:54:31 2008 +0000
@@ -710,6 +710,14 @@
   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);