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

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

Issue 2581083003: Initial OpenType Font Variations Support (Closed)
Patch Set: Fix hash collision tests, adjust test expectations Created 4 years 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 51655f7b1789540f71a68131b0a3ea301f1007c4..ec7a8d5d21e861354f71ef10737ad53d73f46045 100644
--- a/third_party/WebKit/Source/platform/fonts/mac/FontCacheMac.mm
+++ b/third_party/WebKit/Source/platform/fonts/mac/FontCacheMac.mm
@@ -216,7 +216,8 @@ PassRefPtr<SimpleFontData> FontCache::fallbackFontForCharacter(
substituteFont, platformData.size(), syntheticBold,
(traits & NSFontItalicTrait) &&
!(substituteFontTraits & NSFontItalicTrait),
- platformData.orientation());
+ platformData.orientation(),
+ nullptr); // No variation paramaters in fallback.
return fontDataFromFontPlatformData(&alternateFont, DoNotRetain);
}
@@ -281,9 +282,10 @@ std::unique_ptr<FontPlatformData> FontCache::createFontPlatformData(
// font loading failing. Out-of-process loading occurs for registered fonts
// stored in non-system locations. When loading fails, we do not want to use
// the returned FontPlatformData since it will not have a valid SkTypeface.
- std::unique_ptr<FontPlatformData> platformData = WTF::wrapUnique(
- new FontPlatformData(platformFont, size, syntheticBold, syntheticItalic,
- fontDescription.orientation()));
+ std::unique_ptr<FontPlatformData> platformData =
+ WTF::wrapUnique(new FontPlatformData(
kojii 2016/12/21 14:53:12 nit: nice to change to makeUnique in this opportun
drott 2016/12/21 15:22:00 Done.
+ platformFont, size, syntheticBold, syntheticItalic,
+ fontDescription.orientation(), fontDescription.variationSettings()));
if (!platformData->typeface()) {
return nullptr;
}

Powered by Google App Engine
This is Rietveld 408576698