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

Unified Diff: content/zygote/zygote_main_linux.cc

Issue 2239923002: Make blimp work on K (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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: content/zygote/zygote_main_linux.cc
diff --git a/content/zygote/zygote_main_linux.cc b/content/zygote/zygote_main_linux.cc
index 60e88406939fa1a77f1e14d51c26488eb6a28d7d..88b4b4f7875e849647e8749b01e453aaee54bd53 100644
--- a/content/zygote/zygote_main_linux.cc
+++ b/content/zygote/zygote_main_linux.cc
@@ -369,13 +369,23 @@ static void ZygotePreSandboxInit() {
if (android_fonts_dir.size() > 0 && android_fonts_dir.back() != '/')
android_fonts_dir += '/';
- std::string font_config = android_fonts_dir + "fonts.xml";
+
SkFontMgr_Android_CustomFonts custom;
custom.fSystemFontUse =
SkFontMgr_Android_CustomFonts::SystemFontUse::kOnlyCustom;
custom.fBasePath = android_fonts_dir.c_str();
+
+ std::string font_config;
+ std::string fallback_font_config;
+ if (android_fonts_dir.find("kitkat") != std::string::npos) {
+ font_config = android_fonts_dir + "system_fonts.xml";
+ fallback_font_config = android_fonts_dir + "fallback_fonts.xml";
+ custom.fFallbackFontsXml = fallback_font_config.c_str();
+ } else {
+ font_config = android_fonts_dir + "fonts.xml";
+ custom.fFallbackFontsXml = nullptr;
+ }
custom.fFontsXml = font_config.c_str();
- custom.fFallbackFontsXml = nullptr;
custom.fIsolated = true;
blink::WebFontRendering::setSkiaFontManager(SkFontMgr_New_Android(&custom));

Powered by Google App Engine
This is Rietveld 408576698