Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2140)

Unified Diff: Source/platform/mac/WebFontCache.mm

Issue 546973004: Revert 181541 "Merge FontPlatformDataHarfBuzz and FontPlatformData headers" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/platform/fonts/win/FontCacheSkiaWin.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/mac/WebFontCache.mm
diff --git a/Source/platform/mac/WebFontCache.mm b/Source/platform/mac/WebFontCache.mm
index d295ad58327406c6e7680caf4acdaf93e96b02f6..b257596d2cf26a8903a0405949a5870edd5f43d1 100644
--- a/Source/platform/mac/WebFontCache.mm
+++ b/Source/platform/mac/WebFontCache.mm
@@ -189,7 +189,7 @@ static BOOL betterChoice(NSFontTraitMask desiredTraits, int desiredWeight,
int actualWeight = [fontManager weightOfFont:font];
bool syntheticBold = desiredWeight >= 7 && actualWeight < 7;
- bool syntheticItalic = (desiredTraits & NSFontItalicTrait) && !(actualTraits & NSFontItalicTrait);
+ bool syntheticOblique = (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
@@ -201,7 +201,7 @@ static BOOL betterChoice(NSFontTraitMask desiredTraits, int desiredWeight,
if (syntheticBold)
nonSyntheticTraits &= ~NSBoldFontMask;
- if (syntheticItalic)
+ if (syntheticOblique)
nonSyntheticTraits &= ~NSItalicFontMask;
if (nonSyntheticTraits != desiredTraits) {
« no previous file with comments | « Source/platform/fonts/win/FontCacheSkiaWin.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698