fix 'italic' detection

Don't check for italic, check for slant greater than roman. That way, we
catch oblique (which is more slanted than 'italic') too.
This commit is contained in:
Jeff Teunissen 2013-12-01 00:33:36 -05:00
parent 8df5bb1064
commit 5737e249f5

View file

@ -496,7 +496,6 @@ static NSArray *faFromFc(FcPattern *pat)
@end
@implementation FontconfigPatternGenerator
- (void)addName: (NSString*)name
@ -880,7 +879,7 @@ static NSArray *faFromFc(FcPattern *pat)
int value;
if (FcResultMatch == FcPatternGetInteger(pat, FC_SLANT, 0, &value))
{
if (value == FC_SLANT_ITALIC)
if (value > FC_SLANT_ROMAN)
{
symTraits |= NSFontItalicTrait;
}