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

Unified Diff: Source/platform/fonts/skia/FontCacheSkia.cpp

Issue 326763002: Adding WebFallbackFont and renaming SimpleFontFamily (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixing mac build 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/mac/FontCacheMac.mm ('k') | Source/platform/fonts/win/FontCacheSkiaWin.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/fonts/skia/FontCacheSkia.cpp
diff --git a/Source/platform/fonts/skia/FontCacheSkia.cpp b/Source/platform/fonts/skia/FontCacheSkia.cpp
index 2dc0ef2619b6edc0aea15b59f6091c0004592494..5d2294d4989ef4fd517000896e22ad727504ba38 100644
--- a/Source/platform/fonts/skia/FontCacheSkia.cpp
+++ b/Source/platform/fonts/skia/FontCacheSkia.cpp
@@ -49,30 +49,30 @@ void FontCache::platformInit()
}
#if !OS(WIN) && !OS(ANDROID)
-PassRefPtr<SimpleFontData> FontCache::platformFallbackForCharacter(const FontDescription& fontDescription, UChar32 c, const SimpleFontData*)
+PassRefPtr<SimpleFontData> FontCache::fallbackFontForCharacter(const FontDescription& fontDescription, UChar32 c, const SimpleFontData*)
{
icu::Locale locale = icu::Locale::getDefault();
- FontCache::SimpleFontFamily family;
- FontCache::getFontFamilyForCharacter(c, locale.getLanguage(), &family);
- if (family.name.isEmpty())
+ FontCache::PlatformFallbackFont fallbackFont;
+ FontCache::getFontForCharacter(c, locale.getLanguage(), &fallbackFont);
+ if (fallbackFont.name.isEmpty())
return nullptr;
- AtomicString atomicFamily(family.name);
+ AtomicString atomicFamily(fallbackFont.name);
// Changes weight and/or italic of given FontDescription depends on
// the result of fontconfig so that keeping the correct font mapping
// of the given character. See http://crbug.com/32109 for details.
bool shouldSetSyntheticBold = false;
bool shouldSetSyntheticItalic = false;
FontDescription description(fontDescription);
- if (family.isBold && description.weight() < FontWeightBold)
+ if (fallbackFont.isBold && description.weight() < FontWeightBold)
description.setWeight(FontWeightBold);
- if (!family.isBold && description.weight() >= FontWeightBold) {
+ if (!fallbackFont.isBold && description.weight() >= FontWeightBold) {
shouldSetSyntheticBold = true;
description.setWeight(FontWeightNormal);
}
- if (family.isItalic && description.style() == FontStyleNormal)
+ if (fallbackFont.isItalic && description.style() == FontStyleNormal)
description.setStyle(FontStyleItalic);
- if (!family.isItalic && description.style() == FontStyleItalic) {
+ if (!fallbackFont.isItalic && description.style() == FontStyleItalic) {
shouldSetSyntheticItalic = true;
description.setStyle(FontStyleNormal);
}
« no previous file with comments | « Source/platform/fonts/mac/FontCacheMac.mm ('k') | Source/platform/fonts/win/FontCacheSkiaWin.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698