int actualWeight = [fontManager weightOfFont:font];
bool syntheticBold = desiredWeight >= 7 && actualWeight < 7;
- bool syntheticOblique = (desiredTraits & NSFontItalicTrait) && !(actualTraits & NSFontItalicTrait);
+ bool syntheticItalic = (desiredTraits & NSFontItalicTrait) && !(actualTraits & NSFontItalicTrait);
// There are some malformed fonts that will be correctly returned by -fontWithFamily:traits:weight:size: as a match for a particular trait,
// though -[NSFontManager traitsOfFont:] incorrectly claims the font does not have the specified trait. This could result in applying
if (syntheticBold)
nonSyntheticTraits &= ~NSBoldFontMask;
- if (syntheticOblique)
+ if (syntheticItalic)
nonSyntheticTraits &= ~NSItalicFontMask;
if (nonSyntheticTraits != desiredTraits) {