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

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

Issue 1299713004: Reland #2: 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: Rebase against top of tree. 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/fonts/mac/FontFamilyMatcherMacTest.mm » ('j') | no next file with comments »
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..d55d9e450afaa7e4d148736c36e4fc9e4920f19d 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 (IsOSElCapitan()) {
+ 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/fonts/mac/FontFamilyMatcherMacTest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698