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

Side by Side Diff: src/utils/win/SkDWrite.h

Issue 942083004: Use IDWriteFontFallback when available. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comments. Created 5 years, 10 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
« no previous file with comments | « src/ports/SkFontMgr_win_dw.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2014 Google Inc. 2 * Copyright 2014 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkDWrite_DEFINED 8 #ifndef SkDWrite_DEFINED
9 #define SkDWrite_DEFINED 9 #define SkDWrite_DEFINED
10 10
11 #include "SkTemplates.h" 11 #include "SkTemplates.h"
12 #include "SkFontStyle.h" 12 #include "SkFontStyle.h"
13 13
14 #include <dwrite.h> 14 #include <dwrite.h>
15 #include <winsdkver.h> 15 #include <winsdkver.h>
16 16
17 class SkString; 17 class SkString;
18 18
19 //////////////////////////////////////////////////////////////////////////////// 19 ////////////////////////////////////////////////////////////////////////////////
20 // Factory 20 // Factory
21 21
22 #ifndef SK_HAS_DWRITE_1_H 22 #ifndef SK_HAS_DWRITE_1_H
23 #define SK_HAS_DWRITE_1_H (WINVER_MAXVER >= 0x0602) 23 #define SK_HAS_DWRITE_1_H (WINVER_MAXVER >= 0x0602)
24 #endif 24 #endif
25 25
26 #ifndef SK_HAS_DWRITE_2_H
27 #define SK_HAS_DWRITE_2_H (WINVER_MAXVER >= 0x0603)
28 #endif
29
26 IDWriteFactory* sk_get_dwrite_factory(); 30 IDWriteFactory* sk_get_dwrite_factory();
27 31
28 //////////////////////////////////////////////////////////////////////////////// 32 ////////////////////////////////////////////////////////////////////////////////
29 // String conversion 33 // String conversion
30 34
31 /** Prefer to use this type to prevent template proliferation. */ 35 /** Prefer to use this type to prevent template proliferation. */
32 typedef SkAutoSTMalloc<16, WCHAR> SkSMallocWCHAR; 36 typedef SkAutoSTMalloc<16, WCHAR> SkSMallocWCHAR;
33 37
34 /** Converts a utf8 string to a WCHAR string. */ 38 /** Converts a utf8 string to a WCHAR string. */
35 HRESULT sk_cstring_to_wchar(const char* skname, SkSMallocWCHAR* name); 39 HRESULT sk_cstring_to_wchar(const char* skname, SkSMallocWCHAR* name);
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 103
100 fWeight = (DWRITE_FONT_WEIGHT)pattern.weight(); 104 fWeight = (DWRITE_FONT_WEIGHT)pattern.weight();
101 fWidth = (DWRITE_FONT_STRETCH)pattern.width(); 105 fWidth = (DWRITE_FONT_STRETCH)pattern.width();
102 } 106 }
103 DWRITE_FONT_STYLE fSlant; 107 DWRITE_FONT_STYLE fSlant;
104 DWRITE_FONT_WEIGHT fWeight; 108 DWRITE_FONT_WEIGHT fWeight;
105 DWRITE_FONT_STRETCH fWidth; 109 DWRITE_FONT_STRETCH fWidth;
106 }; 110 };
107 111
108 #endif 112 #endif
OLDNEW
« no previous file with comments | « src/ports/SkFontMgr_win_dw.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698