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

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

Issue 1911863002: Revert of Add code to call skia's matchFamilyStyleCharacter API, which uses the (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fallbackproxy
Patch Set: Created 4 years, 8 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 6b8b3c71e69c760f66964a7e0bcf1f02f60ccca1..ddaadd6acb74065fc9110dea7aa420929d4d0afc 100644
--- a/third_party/WebKit/Source/platform/fonts/win/FontCacheSkiaWin.cpp
+++ b/third_party/WebKit/Source/platform/fonts/win/FontCacheSkiaWin.cpp
@@ -33,7 +33,6 @@
#include "SkFontMgr.h"
#include "SkTypeface_win.h"
-#include "platform/Language.h"
#include "platform/RuntimeEnabledFeatures.h"
#include "platform/fonts/FontDescription.h"
#include "platform/fonts/FontFaceCreationParams.h"
@@ -141,37 +140,6 @@
if (family) {
FontFaceCreationParams createByFamily(AtomicString(family, wcslen(family)));
data = getFontPlatformData(fontDescription, createByFamily);
- }
-
- 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().isEmpty()) {
- fontLocale = toSkFontMgrLocale(fontDescription.locale());
- bcp47Locale = fontLocale.data();
- localeCount = 1;
- }
-
- CString familyName = fontDescription.family().family().utf8();
-
- SkTypeface* typeface = m_fontManager->matchFamilyStyleCharacter(
- familyName.data(),
- fontDescription.skiaFontStyle(),
- &bcp47Locale,
- localeCount,
- character);
- if (typeface) {
- SkString skiaFamily;
- typeface->getFamilyName(&skiaFamily);
- FontFaceCreationParams createByFamily(
- AtomicString(skiaFamily.c_str()));
- data = getFontPlatformData(fontDescription, createByFamily);
- }
}
// Last resort font list : PanUnicode. CJK fonts have a pretty

Powered by Google App Engine
This is Rietveld 408576698