(ftfont_match): Explicitly set pixelsize in pattern.

This commit is contained in:
Kenichi Handa 2008-02-28 12:54:46 +00:00
parent e2b2793b5c
commit 550826426f
2 changed files with 10 additions and 0 deletions

View 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

View 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);