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

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

Issue 307243002: Fix font family based fallback font selection (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Windows link fix. Created 6 years, 6 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/linux/FontCacheLinux.cpp ('k') | Source/platform/fonts/skia/FontCacheSkia.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/fonts/mac/FontCacheMac.mm
diff --git a/Source/platform/fonts/mac/FontCacheMac.mm b/Source/platform/fonts/mac/FontCacheMac.mm
index 3f69c1002d80ca9169815001d09b6e02518d923d..1503d7a7e4c5b3ac16a261f7f5ff6cee64ddabd0 100644
--- a/Source/platform/fonts/mac/FontCacheMac.mm
+++ b/Source/platform/fonts/mac/FontCacheMac.mm
@@ -34,6 +34,7 @@
#import "platform/LayoutTestSupport.h"
#import "platform/RuntimeEnabledFeatures.h"
#import "platform/fonts/FontDescription.h"
+#import "platform/fonts/FontFaceCreationParams.h"
#import "platform/fonts/FontPlatformData.h"
#import "platform/fonts/SimpleFontData.h"
#import "platform/mac/WebFontCache.h"
@@ -201,13 +202,13 @@ PassRefPtr<SimpleFontData> FontCache::getLastResortFallbackFont(const FontDescri
return getFontData(fontDescription, lucidaGrandeStr, false, shouldRetain);
}
-FontPlatformData* FontCache::createFontPlatformData(const FontDescription& fontDescription, const AtomicString& family, float fontSize)
+FontPlatformData* FontCache::createFontPlatformData(const FontDescription& fontDescription, const FontFaceCreationParams& creationParams, float fontSize)
{
NSFontTraitMask traits = fontDescription.style() ? NSFontItalicTrait : 0;
NSInteger weight = toAppKitFontWeight(fontDescription.weight());
float size = fontSize;
- NSFont *nsFont = [WebFontCache fontWithFamily:family traits:traits weight:weight size:size];
+ NSFont *nsFont = [WebFontCache fontWithFamily:creationParams.family() traits:traits weight:weight size:size];
if (!nsFont)
return 0;
« no previous file with comments | « Source/platform/fonts/linux/FontCacheLinux.cpp ('k') | Source/platform/fonts/skia/FontCacheSkia.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698