Index: components/html_viewer/global_state.cc |
diff --git a/components/html_viewer/global_state.cc b/components/html_viewer/global_state.cc |
index ec0f570951c647531596cc5dc7c4cc485ed3ef25..870c4e7a90bb40594768e976b123d40993b31088 100644 |
--- a/components/html_viewer/global_state.cc |
+++ b/components/html_viewer/global_state.cc |
@@ -22,6 +22,10 @@ |
#include "ui/mojo/init/ui_init.h" |
#include "v8/include/v8.h" |
+#if defined(OS_LINUX) && !defined(OS_ANDROID) |
+#include "components/font_service/public/cpp/font_loader.h" |
+#endif |
+ |
namespace html_viewer { |
namespace { |
@@ -93,6 +97,10 @@ void GlobalState::InitIfNecessary(const gfx::Size& screen_size_in_pixels, |
return; |
} |
+#if defined(OS_LINUX) && !defined(OS_ANDROID) |
+ SkFontConfigInterface::SetGlobal(new font_service::FontLoader(app_)); |
+#endif |
+ |
ui_init_.reset( |
new ui::mojo::UIInit(screen_size_in_pixels, device_pixel_ratio)); |
base::DiscardableMemoryAllocator::SetInstance(&discardable_memory_allocator_); |