/* Score three style numeric fields. Maximum difference is 127. */
for (i = FONT_WEIGHT_INDEX; i <= FONT_WIDTH_INDEX; i++)
- if (! NILP (spec_prop[i]) && ! EQ (AREF (entity, i), spec_prop[i]))
+ if (! NILP (spec_prop[i])
+ && ! EQ (AREF (entity, i), spec_prop[i])
+ && FIXNUMP (AREF (entity, i)))
{
EMACS_INT diff = ((XFIXNUM (AREF (entity, i)) >> 8)
- (XFIXNUM (spec_prop[i]) >> 8));
}
for (prop = FONT_WEIGHT_INDEX; prop < FONT_SIZE_INDEX; prop++)
if (FIXNUMP (AREF (spec, prop))
- && ((XFIXNUM (AREF (spec, prop)) >> 8)
- != (XFIXNUM (AREF (entity, prop)) >> 8)))
+ && ! (FIXNUMP (AREF (entity, prop))
+ && ((XFIXNUM (AREF (spec, prop)) >> 8)
+ == (XFIXNUM (AREF (entity, prop)) >> 8))))
prop = FONT_SPEC_MAX;
if (prop < FONT_SPEC_MAX
&& size