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

Side by Side 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: Style fixes 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_CHILD_DWRITE_FONT_PROXY_FONT_FALLBACK_WIN_H_
6 #define CONTENT_CHILD_DWRITE_FONT_PROXY_FONT_FALLBACK_WIN_H_
7
8 #include <dwrite.h>
9 #include <dwrite_2.h>
10 #include <wrl.h>
11
12 #include "content/child/dwrite_font_proxy/dwrite_font_proxy_win.h"
13 #include "content/common/content_export.h"
14 #include "ipc/ipc_sender.h"
15
16 namespace content {
17
18 // Implements an IDWriteFontFallback that uses IPC to proxy the fallback calls
19 // to the system fallback in the browser process.
20 class CONTENT_EXPORT FontFallback
21 : public Microsoft::WRL::RuntimeClass<
22 Microsoft::WRL::RuntimeClassFlags<Microsoft::WRL::ClassicCom>,
23 IDWriteFontFallback> {
24 public:
25 HRESULT STDMETHODCALLTYPE
26 MapCharacters(IDWriteTextAnalysisSource* source,
27 UINT32 text_position,
28 UINT32 text_length,
29 IDWriteFontCollection* base_font_collection,
30 const wchar_t* base_family_name,
31 DWRITE_FONT_WEIGHT base_weight,
32 DWRITE_FONT_STYLE base_style,
33 DWRITE_FONT_STRETCH base_stretch,
34 UINT32* mapped_length,
35 IDWriteFont** mapped_font,
36 FLOAT* scale) override;
37
38 HRESULT STDMETHODCALLTYPE
39 RuntimeClassInitialize(DWriteFontCollectionProxy* collection,
40 IPC::Sender* sender_override);
41
42 private:
43 IPC::Sender* sender_override_;
44 Microsoft::WRL::ComPtr<DWriteFontCollectionProxy> collection_;
45 };
46
47 } // namespace content
48
49 #endif // CONTENT_CHILD_DWRITE_FONT_PROXY_FONT_FALLBACK_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698