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

Unified Diff: third_party/WebKit/Source/platform/fonts/mac/FontCacheMac.mm

Issue 2692803005: Avoid checking family name in getLastResortFallbackFont() on Windows (Closed)
Patch Set: Created 3 years, 10 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
Index: third_party/WebKit/Source/platform/fonts/mac/FontCacheMac.mm
diff --git a/third_party/WebKit/Source/platform/fonts/mac/FontCacheMac.mm b/third_party/WebKit/Source/platform/fonts/mac/FontCacheMac.mm
index 469f2d48519200dd01500ec09cd428d39d84ecc3..ecc4342e1120757a332af295522b3d0c010c6d10 100644
--- a/third_party/WebKit/Source/platform/fonts/mac/FontCacheMac.mm
+++ b/third_party/WebKit/Source/platform/fonts/mac/FontCacheMac.mm
@@ -231,7 +231,8 @@ PassRefPtr<SimpleFontData> FontCache::getLastResortFallbackFont(
// For now we'll pick the default that the user would get without changing
// any prefs.
RefPtr<SimpleFontData> simpleFontData =
- getFontData(fontDescription, timesStr, false, shouldRetain);
+ getFontData(fontDescription, timesStr, AlternateFontName::AllowAlternate,
+ shouldRetain);
if (simpleFontData)
return simpleFontData.release();
@@ -240,13 +241,15 @@ PassRefPtr<SimpleFontData> FontCache::getLastResortFallbackFont(
// that's guaranteed to be there, according to Nathan Taylor. This is good
// enough to avoid a crash at least.
DEFINE_STATIC_LOCAL(AtomicString, lucidaGrandeStr, ("Lucida Grande"));
- return getFontData(fontDescription, lucidaGrandeStr, false, shouldRetain);
+ return getFontData(fontDescription, lucidaGrandeStr,
+ AlternateFontName::AllowAlternate, shouldRetain);
}
std::unique_ptr<FontPlatformData> FontCache::createFontPlatformData(
const FontDescription& fontDescription,
const FontFaceCreationParams& creationParams,
- float fontSize) {
+ float fontSize,
+ AlternateFontName) {
NSFontTraitMask traits = fontDescription.style() ? NSFontItalicTrait : 0;
float size = fontSize;

Powered by Google App Engine
This is Rietveld 408576698