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

Unified Diff: content/child/dwrite_font_proxy/dwrite_font_proxy_init_win.cc

Issue 1846433005: Implement direct write fallback proxy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a missing SUCCEEDED call Created 4 years, 8 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/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

Powered by Google App Engine
This is Rietveld 408576698