| Index: content/child/dwrite_font_proxy/dwrite_font_proxy_init_win.cc
|
| diff --git a/content/child/dwrite_font_proxy/dwrite_font_proxy_init_win.cc b/content/child/dwrite_font_proxy/dwrite_font_proxy_init_win.cc
|
| index 58d10551b9b268b36072ae0faa2c553fe285acc5..e7a2f2afe6f3cf5a9aba5847a9f0c65f772c570c 100644
|
| --- a/content/child/dwrite_font_proxy/dwrite_font_proxy_init_win.cc
|
| +++ b/content/child/dwrite_font_proxy/dwrite_font_proxy_init_win.cc
|
| @@ -12,6 +12,7 @@
|
| #include "base/win/iat_patch_function.h"
|
| #include "base/win/windows_version.h"
|
| #include "content/child/dwrite_font_proxy/dwrite_font_proxy_win.h"
|
| +#include "content/child/dwrite_font_proxy/font_fallback_win.h"
|
| #include "content/child/font_warmup_win.h"
|
| #include "skia/ext/fontmgr_default_win.h"
|
| #include "third_party/WebKit/public/web/win/WebFontRendering.h"
|
| @@ -71,8 +72,15 @@ void InitializeDWriteFontProxy() {
|
| &g_font_collection, factory.Get(), g_sender_override);
|
| }
|
|
|
| - sk_sp<SkFontMgr> skia_font_manager(
|
| - SkFontMgr_New_DirectWrite(factory.Get(), g_font_collection.Get()));
|
| + mswr::ComPtr<IDWriteFontFallback> font_fallback;
|
| + mswr::ComPtr<IDWriteFactory2> factory2;
|
| + if (SUCCEEDED(factory.As(&factory2)) && factory2.Get()) {
|
| + mswr::MakeAndInitialize<FontFallback>(
|
| + &font_fallback, g_font_collection.Get(), g_sender_override);
|
| + }
|
| +
|
| + sk_sp<SkFontMgr> skia_font_manager(SkFontMgr_New_DirectWrite(
|
| + factory.Get(), g_font_collection.Get(), font_fallback.Get()));
|
| blink::WebFontRendering::setSkiaFontManager(skia_font_manager.get());
|
|
|
| // Add an extra ref for SetDefaultSkiaFactory, which keeps a ref but doesn't
|
|
|