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

Unified Diff: Source/platform/fonts/mac/FontFamilyMatcherMac.mm

Issue 1284993004: Add a short term solution to fix OSX 10.11 system font rendering problems. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 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 | « no previous file | Source/platform/mac/VersionUtilMac.h » ('j') | Source/platform/mac/VersionUtilMac.mm » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/fonts/mac/FontFamilyMatcherMac.mm
diff --git a/Source/platform/fonts/mac/FontFamilyMatcherMac.mm b/Source/platform/fonts/mac/FontFamilyMatcherMac.mm
index d71d4b223a1fff0288e7b4ddaca238a49ca1f2a5..3000356ef695ff943f7cf44d094ac02f3518ebcb 100644
--- a/Source/platform/fonts/mac/FontFamilyMatcherMac.mm
+++ b/Source/platform/fonts/mac/FontFamilyMatcherMac.mm
@@ -133,6 +133,15 @@ static BOOL betterChoice(NSFontTraitMask desiredTraits, int desiredWeight,
NSFont* MatchNSFontFamily(NSString* desiredFamily, NSFontTraitMask desiredTraits, FontWeight desiredWeight, float size)
{
if ([desiredFamily isEqualToString:@"BlinkMacSystemFont"]) {
+ // On OSX 10.11, returning the default system font causes rendering
+ // problems. In the short term, return nil, which is what would be
+ // returned if "BlinkMacSystemFont" was never introduced.
+ // TODO(erikchen): Fix the rendering problems.
+ // http://crbug.com/521034.
+ if (!IsOSYosemiteOrEarlier()) {
+ return nil;
+ }
+
// On OSX 10.9, the default system font depends on the SDK version. When
// compiled against the OSX 10.10 SDK, the font is .LucidaGrandeUI. When
// compiled against the OSX 10.6 SDK, the font is Lucida Grande. Layout
« no previous file with comments | « no previous file | Source/platform/mac/VersionUtilMac.h » ('j') | Source/platform/mac/VersionUtilMac.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698