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

Unified Diff: third_party/WebKit/Source/platform/fonts/win/FontCacheSkiaWin.cpp

Issue 1757703003: Extend FontCache fallback API to support FontFallbackPriority (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments addressed Created 4 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/win/FontCacheSkiaWin.cpp
diff --git a/third_party/WebKit/Source/platform/fonts/win/FontCacheSkiaWin.cpp b/third_party/WebKit/Source/platform/fonts/win/FontCacheSkiaWin.cpp
index 5a61fc126196325097777b82e2cfa2d24a56a1ce..ce7da4e3eb303886b32f61780cc5f8794f6a0803 100644
--- a/third_party/WebKit/Source/platform/fonts/win/FontCacheSkiaWin.cpp
+++ b/third_party/WebKit/Source/platform/fonts/win/FontCacheSkiaWin.cpp
@@ -115,11 +115,13 @@ FontCache::FontCache()
// font that can be used to render the given range of characters.
PassRefPtr<SimpleFontData> FontCache::fallbackFontForCharacter(
const FontDescription& fontDescription, UChar32 character,
- const SimpleFontData* originalFontData)
+ const SimpleFontData* originalFontData,
+ FontFallbackPriority fallbackPriority)
{
// First try the specified font with standard style & weight.
- if (fontDescription.style() == FontStyleItalic
- || fontDescription.weight() >= FontWeightBold) {
+ if (fallbackPriority != FontFallbackPriority::EmojiEmoji
+ && (fontDescription.style() == FontStyleItalic
+ || fontDescription.weight() >= FontWeightBold)) {
RefPtr<SimpleFontData> fontData = fallbackOnStandardFontStyle(
fontDescription, character);
if (fontData)
@@ -132,6 +134,7 @@ PassRefPtr<SimpleFontData> FontCache::fallbackFontForCharacter(
fontDescription.script(),
fontDescription.locale(),
&script,
+ fallbackPriority,
m_fontManager.get());
FontPlatformData* data = 0;
if (family) {

Powered by Google App Engine
This is Rietveld 408576698