Mercurial > emacs
changeset 90568:3762a2cc74de
(ftfont_pattern_entity): If the pattern doesn't contain
FC_SPACING, don't assuce FC_MONO.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Tue, 01 Aug 2006 02:40:50 +0000 |
parents | 009accc57d73 |
children | 0af2dbdeaeb3 |
files | src/ftfont.c |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ftfont.c Tue Aug 01 01:52:01 2006 +0000 +++ b/src/ftfont.c Tue Aug 01 02:40:50 2006 +0000 @@ -140,7 +140,7 @@ ASET (entity, FONT_SIZE_INDEX, make_number (0)); if (FcPatternGetInteger (p, FC_SPACING, 0, &numeric) != FcResultMatch) - numeric = FC_MONO; + numeric = -1; file = FcStrCopy (file); if (! file) return Qnil; @@ -151,7 +151,8 @@ if (FcPatternAddString (p, FC_FILE, file) == FcFalse || (charset && FcPatternAddCharSet (p, FC_CHARSET, charset) == FcFalse) - || FcPatternAddInteger (p, FC_SPACING, numeric) == FcFalse) + || (numeric >= 0 + && FcPatternAddInteger (p, FC_SPACING, numeric) == FcFalse)) { FcPatternDestroy (p); return Qnil;