Index: third_party/WebKit/Source/platform/fonts/android/FontCacheAndroid.cpp |
diff --git a/third_party/WebKit/Source/platform/fonts/android/FontCacheAndroid.cpp b/third_party/WebKit/Source/platform/fonts/android/FontCacheAndroid.cpp |
index 0f24adb0b2c607e6552601f822c07fc74842941e..470ed688837bd9f1fea2c58f62199dc156d71ee8 100644 |
--- a/third_party/WebKit/Source/platform/fonts/android/FontCacheAndroid.cpp |
+++ b/third_party/WebKit/Source/platform/fonts/android/FontCacheAndroid.cpp |
@@ -51,6 +51,13 @@ PassRefPtr<SimpleFontData> FontCache::fallbackFontForCharacter(const FontDescrip |
// static |
AtomicString FontCache::getGenericFamilyNameForScript(const AtomicString& familyName, const FontDescription& fontDescription) |
{ |
+ // If monospace, do not apply CJK hack to find i18n fonts, because |
+ // i18n fonts are likely not monospace. Monospace is mostly used |
+ // for code, but when i18n characters appear in monospace, system |
+ // fallback can still render the characters. |
drott
2016/08/30 08:18:58
Looks okay to me but let's file a bug to keep trac
|
+ if (familyName == FontFamilyNames::webkit_monospace) |
+ return familyName; |
+ |
// This is a hack to use the preferred font for CJK scripts. |
// FIXME: Use new Skia API once Android system supports per-family and per-script fallback fonts. |
UChar32 examplerChar; |