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

Unified Diff: Source/core/css/CSSFontSelector.cpp

Issue 24622002: Workaround font preference in CJK DOM locales (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Test Created 7 years, 3 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: Source/core/css/CSSFontSelector.cpp
diff --git a/Source/core/css/CSSFontSelector.cpp b/Source/core/css/CSSFontSelector.cpp
index bfe6bfefa7478aee003eba7bbd33af4d865e09bd..10509129bc602a164bf94e23cd6842e089d7967a 100644
--- a/Source/core/css/CSSFontSelector.cpp
+++ b/Source/core/css/CSSFontSelector.cpp
@@ -170,6 +170,9 @@ static PassRefPtr<FontData> fontDataForGenericFamily(Document* document, const F
AtomicString genericFamily;
UScriptCode script = fontDescription.script();
+#if OS(ANDROID)
+ genericFamily = FontCache::getGenericFamilyNameForScript(familyName, script);
+#else
if (familyName == serifFamily)
genericFamily = settings->serifFontFamily(script);
else if (familyName == sansSerifFamily)
@@ -184,6 +187,7 @@ static PassRefPtr<FontData> fontDataForGenericFamily(Document* document, const F
genericFamily = settings->pictographFontFamily(script);
else if (familyName == standardFamily)
genericFamily = settings->standardFontFamily(script);
+#endif
if (!genericFamily.isEmpty())
return fontCache()->getFontResourceData(fontDescription, genericFamily);

Powered by Google App Engine
This is Rietveld 408576698