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

Unified Diff: content/child/dwrite_font_proxy/font_fallback_win.h

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/font_fallback_win.h
diff --git a/content/child/dwrite_font_proxy/font_fallback_win.h b/content/child/dwrite_font_proxy/font_fallback_win.h
new file mode 100644
index 0000000000000000000000000000000000000000..925ebb0641ffe3cfa5b07a447bb7d26e6d3c9563
--- /dev/null
+++ b/content/child/dwrite_font_proxy/font_fallback_win.h
@@ -0,0 +1,56 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_CHILD_DWRITE_FONT_PROXY_FONT_FALLBACK_WIN_H_
+#define CONTENT_CHILD_DWRITE_FONT_PROXY_FONT_FALLBACK_WIN_H_
+
+#include <dwrite.h>
+#include <dwrite_2.h>
+#include <wrl.h>
+
+#include "content/child/dwrite_font_proxy/dwrite_font_proxy_win.h"
+#include "content/common/content_export.h"
+#include "ipc/ipc_sender.h"
+
+namespace content {
+
+// Implements an IDWriteFontFallback that uses IPC to proxy the fallback calls
+// to the system fallback in the browser process.
+class CONTENT_EXPORT FontFallback
+ : public Microsoft::WRL::RuntimeClass<
+ Microsoft::WRL::RuntimeClassFlags<Microsoft::WRL::ClassicCom>,
+ IDWriteFontFallback> {
+ public:
+ FontFallback();
+
+ HRESULT STDMETHODCALLTYPE
+ MapCharacters(IDWriteTextAnalysisSource* source,
+ UINT32 text_position,
+ UINT32 text_length,
+ IDWriteFontCollection* base_font_collection,
+ const wchar_t* base_family_name,
+ DWRITE_FONT_WEIGHT base_weight,
+ DWRITE_FONT_STYLE base_style,
+ DWRITE_FONT_STRETCH base_stretch,
+ UINT32* mapped_length,
+ IDWriteFont** mapped_font,
+ FLOAT* scale) override;
+
+ HRESULT STDMETHODCALLTYPE
+ RuntimeClassInitialize(DWriteFontCollectionProxy* collection,
+ IPC::Sender* sender_override);
+
+ protected:
+ ~FontFallback() override;
+
+ private:
+ IPC::Sender* sender_override_;
+ Microsoft::WRL::ComPtr<DWriteFontCollectionProxy> collection_;
+
+ DISALLOW_ASSIGN(FontFallback);
+};
+
+} // namespace content
+
+#endif // CONTENT_CHILD_DWRITE_FONT_PROXY_FONT_FALLBACK_WIN_H_
« no previous file with comments | « content/child/dwrite_font_proxy/dwrite_font_proxy_win.cc ('k') | content/child/dwrite_font_proxy/font_fallback_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698