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

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

Issue 542653002: Merge FontPlatformDataHarfBuzz and FontPlatformData headers (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@mergePlatformData
Patch Set: Argument name incorrect 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 b257596d2cf26a8903a0405949a5870edd5f43d1..d295ad58327406c6e7680caf4acdaf93e96b02f6 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 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
@@ -201,7 +201,7 @@ static BOOL betterChoice(NSFontTraitMask desiredTraits, int desiredWeight,
if (syntheticBold)
nonSyntheticTraits &= ~NSBoldFontMask;
- if (syntheticOblique)
+ if (syntheticItalic)
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