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

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

Issue 2192703002: More LayoutLocale refactor with additional Chinese support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comment updated as per drott review Created 4 years, 5 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 70e018ed8f6619a76b2dc9b24a767a25f525a16f..b8e6238cdda2c31b1fc4e6ba22e5a1bdfcfa4aeb 100644
--- a/third_party/WebKit/Source/platform/fonts/win/FontCacheSkiaWin.cpp
+++ b/third_party/WebKit/Source/platform/fonts/win/FontCacheSkiaWin.cpp
@@ -126,7 +126,7 @@ PassRefPtr<SimpleFontData> FontCache::fallbackFontForCharacter(
UScriptCode script;
const wchar_t* family = getFallbackFamily(character,
fontDescription.genericFamily(),
- fontDescription.localeOrDefault(),
+ fontDescription.locale(),
&script,
fallbackPriority,
m_fontManager.get());
@@ -139,14 +139,12 @@ PassRefPtr<SimpleFontData> FontCache::fallbackFontForCharacter(
if ((!data || !data->fontContainsCharacter(character)) && s_useSkiaFontFallback) {
const char* bcp47Locale = nullptr;
int localeCount = 0;
- CString fontLocale;
// If the font description has a locale, use that. Otherwise, Skia will
// fall back on the user's default locale.
// TODO(kulshin): extract locale fallback logic from
// FontCacheAndroid.cpp and share that code
if (fontDescription.locale()) {
- fontLocale = fontDescription.locale()->localeForSkFontMgr();
- bcp47Locale = fontLocale.data();
+ bcp47Locale = fontDescription.locale()->localeForSkFontMgr();
localeCount = 1;
}

Powered by Google App Engine
This is Rietveld 408576698