1 // Copyright © 2017 winapi-rs developers
2 // Licensed under the Apache License, Version 2.0
3 // <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
4 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option.
5 // All files in the project carrying such notice may not be copied, modified, or distributed
6 // except according to those terms.
7 //! Mappings for the content of dwrite_1.h
8 use shared::basetsd::{INT16, INT32, UINT16, UINT32, UINT8};
9 use shared::minwindef::{BOOL, FLOAT};
10 use um::dcommon::DWRITE_MEASURING_MODE;
11 use um::dwrite::{
12     DWRITE_GLYPH_OFFSET, DWRITE_MATRIX, DWRITE_PIXEL_GEOMETRY, DWRITE_RENDERING_MODE,
13     DWRITE_SCRIPT_ANALYSIS, DWRITE_SHAPING_GLYPH_PROPERTIES, DWRITE_TEXT_RANGE,
14     IDWriteBitmapRenderTarget, IDWriteBitmapRenderTargetVtbl, IDWriteFactory, IDWriteFactoryVtbl,
15     IDWriteFont, IDWriteFontCollection, IDWriteFontFace, IDWriteFontFaceVtbl, IDWriteFontVtbl,
16     IDWriteRenderingParams, IDWriteRenderingParamsVtbl, IDWriteTextAnalysisSink,
17     IDWriteTextAnalysisSinkVtbl, IDWriteTextAnalysisSource, IDWriteTextAnalysisSourceVtbl,
18     IDWriteTextAnalyzer, IDWriteTextAnalyzerVtbl, IDWriteTextLayout, IDWriteTextLayoutVtbl,
19 };
20 use um::winnt::{HRESULT, WCHAR};
21 ENUM!{enum DWRITE_PANOSE_FAMILY {
22     DWRITE_PANOSE_FAMILY_ANY = 0x0, // 0
23     DWRITE_PANOSE_FAMILY_NO_FIT = 0x1, // 1
24     DWRITE_PANOSE_FAMILY_TEXT_DISPLAY = 0x2, // 2
25     DWRITE_PANOSE_FAMILY_SCRIPT = 0x3, // 3
26     DWRITE_PANOSE_FAMILY_DECORATIVE = 0x4, // 4
27     DWRITE_PANOSE_FAMILY_SYMBOL = 0x5, // 5
28     DWRITE_PANOSE_FAMILY_PICTORIAL = 0x5, // 5
29 }}
30 ENUM!{enum DWRITE_PANOSE_SERIF_STYLE {
31     DWRITE_PANOSE_SERIF_STYLE_ANY = 0x0, // 0
32     DWRITE_PANOSE_SERIF_STYLE_NO_FIT = 0x1, // 1
33     DWRITE_PANOSE_SERIF_STYLE_COVE = 0x2, // 2
34     DWRITE_PANOSE_SERIF_STYLE_OBTUSE_COVE = 0x3, // 3
35     DWRITE_PANOSE_SERIF_STYLE_SQUARE_COVE = 0x4, // 4
36     DWRITE_PANOSE_SERIF_STYLE_OBTUSE_SQUARE_COVE = 0x5, // 5
37     DWRITE_PANOSE_SERIF_STYLE_SQUARE = 0x6, // 6
38     DWRITE_PANOSE_SERIF_STYLE_THIN = 0x7, // 7
39     DWRITE_PANOSE_SERIF_STYLE_OVAL = 0x8, // 8
40     DWRITE_PANOSE_SERIF_STYLE_EXAGGERATED = 0x9, // 9
41     DWRITE_PANOSE_SERIF_STYLE_TRIANGLE = 0xA, // 10
42     DWRITE_PANOSE_SERIF_STYLE_NORMAL_SANS = 0xB, // 11
43     DWRITE_PANOSE_SERIF_STYLE_OBTUSE_SANS = 0xC, // 12
44     DWRITE_PANOSE_SERIF_STYLE_PERPENDICULAR_SANS = 0xD, // 13
45     DWRITE_PANOSE_SERIF_STYLE_FLARED = 0xE, // 14
46     DWRITE_PANOSE_SERIF_STYLE_ROUNDED = 0xF, // 15
47     DWRITE_PANOSE_SERIF_STYLE_SCRIPT = 0x10, // 16
48     DWRITE_PANOSE_SERIF_STYLE_PERP_SANS = 0xD, // 13
49     DWRITE_PANOSE_SERIF_STYLE_BONE = 0x8, // 8
50 }}
51 ENUM!{enum DWRITE_PANOSE_WEIGHT {
52     DWRITE_PANOSE_WEIGHT_ANY = 0x0, // 0
53     DWRITE_PANOSE_WEIGHT_NO_FIT = 0x1, // 1
54     DWRITE_PANOSE_WEIGHT_VERY_LIGHT = 0x2, // 2
55     DWRITE_PANOSE_WEIGHT_LIGHT = 0x3, // 3
56     DWRITE_PANOSE_WEIGHT_THIN = 0x4, // 4
57     DWRITE_PANOSE_WEIGHT_BOOK = 0x5, // 5
58     DWRITE_PANOSE_WEIGHT_MEDIUM = 0x6, // 6
59     DWRITE_PANOSE_WEIGHT_DEMI = 0x7, // 7
60     DWRITE_PANOSE_WEIGHT_BOLD = 0x8, // 8
61     DWRITE_PANOSE_WEIGHT_HEAVY = 0x9, // 9
62     DWRITE_PANOSE_WEIGHT_BLACK = 0xA, // 10
63     DWRITE_PANOSE_WEIGHT_EXTRA_BLACK = 0xB, // 11
64     DWRITE_PANOSE_WEIGHT_NORD = 0xB, // 11
65 }}
66 ENUM!{enum DWRITE_PANOSE_PROPORTION {
67     DWRITE_PANOSE_PROPORTION_ANY = 0x0, // 0
68     DWRITE_PANOSE_PROPORTION_NO_FIT = 0x1, // 1
69     DWRITE_PANOSE_PROPORTION_OLD_STYLE = 0x2, // 2
70     DWRITE_PANOSE_PROPORTION_MODERN = 0x3, // 3
71     DWRITE_PANOSE_PROPORTION_EVEN_WIDTH = 0x4, // 4
72     DWRITE_PANOSE_PROPORTION_EXPANDED = 0x5, // 5
73     DWRITE_PANOSE_PROPORTION_CONDENSED = 0x6, // 6
74     DWRITE_PANOSE_PROPORTION_VERY_EXPANDED = 0x7, // 7
75     DWRITE_PANOSE_PROPORTION_VERY_CONDENSED = 0x8, // 8
76     DWRITE_PANOSE_PROPORTION_MONOSPACED = 0x9, // 9
77 }}
78 ENUM!{enum DWRITE_PANOSE_CONTRAST {
79     DWRITE_PANOSE_CONTRAST_ANY = 0x0, // 0
80     DWRITE_PANOSE_CONTRAST_NO_FIT = 0x1, // 1
81     DWRITE_PANOSE_CONTRAST_NONE = 0x2, // 2
82     DWRITE_PANOSE_CONTRAST_VERY_LOW = 0x3, // 3
83     DWRITE_PANOSE_CONTRAST_LOW = 0x4, // 4
84     DWRITE_PANOSE_CONTRAST_MEDIUM_LOW = 0x5, // 5
85     DWRITE_PANOSE_CONTRAST_MEDIUM = 0x6, // 6
86     DWRITE_PANOSE_CONTRAST_MEDIUM_HIGH = 0x7, // 7
87     DWRITE_PANOSE_CONTRAST_HIGH = 0x8, // 8
88     DWRITE_PANOSE_CONTRAST_VERY_HIGH = 0x9, // 9
89     DWRITE_PANOSE_CONTRAST_HORIZONTAL_LOW = 0xA, // 10
90     DWRITE_PANOSE_CONTRAST_HORIZONTAL_MEDIUM = 0xB, // 11
91     DWRITE_PANOSE_CONTRAST_HORIZONTAL_HIGH = 0xC, // 12
92     DWRITE_PANOSE_CONTRAST_BROKEN = 0xD, // 13
93 }}
94 ENUM!{enum DWRITE_PANOSE_STROKE_VARIATION {
95     DWRITE_PANOSE_STROKE_VARIATION_ANY = 0x0, // 0
96     DWRITE_PANOSE_STROKE_VARIATION_NO_FIT = 0x1, // 1
97     DWRITE_PANOSE_STROKE_VARIATION_NO_VARIATION = 0x2, // 2
98     DWRITE_PANOSE_STROKE_VARIATION_GRADUAL_DIAGONAL = 0x3, // 3
99     DWRITE_PANOSE_STROKE_VARIATION_GRADUAL_TRANSITIONAL = 0x4, // 4
100     DWRITE_PANOSE_STROKE_VARIATION_GRADUAL_VERTICAL = 0x5, // 5
101     DWRITE_PANOSE_STROKE_VARIATION_GRADUAL_HORIZONTAL = 0x6, // 6
102     DWRITE_PANOSE_STROKE_VARIATION_RAPID_VERTICAL = 0x7, // 7
103     DWRITE_PANOSE_STROKE_VARIATION_RAPID_HORIZONTAL = 0x8, // 8
104     DWRITE_PANOSE_STROKE_VARIATION_INSTANT_VERTICAL = 0x9, // 9
105     DWRITE_PANOSE_STROKE_VARIATION_INSTANT_HORIZONTAL = 0xA, // 10
106 }}
107 ENUM!{enum DWRITE_PANOSE_ARM_STYLE {
108     DWRITE_PANOSE_ARM_STYLE_ANY = 0x0, // 0
109     DWRITE_PANOSE_ARM_STYLE_NO_FIT = 0x1, // 1
110     DWRITE_PANOSE_ARM_STYLE_STRAIGHT_ARMS_HORIZONTAL = 0x2, // 2
111     DWRITE_PANOSE_ARM_STYLE_STRAIGHT_ARMS_WEDGE = 0x3, // 3
112     DWRITE_PANOSE_ARM_STYLE_STRAIGHT_ARMS_VERTICAL = 0x4, // 4
113     DWRITE_PANOSE_ARM_STYLE_STRAIGHT_ARMS_SINGLE_SERIF = 0x5, // 5
114     DWRITE_PANOSE_ARM_STYLE_STRAIGHT_ARMS_DOUBLE_SERIF = 0x6, // 6
115     DWRITE_PANOSE_ARM_STYLE_NONSTRAIGHT_ARMS_HORIZONTAL = 0x7, // 7
116     DWRITE_PANOSE_ARM_STYLE_NONSTRAIGHT_ARMS_WEDGE = 0x8, // 8
117     DWRITE_PANOSE_ARM_STYLE_NONSTRAIGHT_ARMS_VERTICAL = 0x9, // 9
118     DWRITE_PANOSE_ARM_STYLE_NONSTRAIGHT_ARMS_SINGLE_SERIF = 0xA, // 10
119     DWRITE_PANOSE_ARM_STYLE_NONSTRAIGHT_ARMS_DOUBLE_SERIF = 0xB, // 11
120     DWRITE_PANOSE_ARM_STYLE_STRAIGHT_ARMS_HORZ = 0x2, // 2
121     DWRITE_PANOSE_ARM_STYLE_STRAIGHT_ARMS_VERT = 0x4, // 4
122     DWRITE_PANOSE_ARM_STYLE_BENT_ARMS_HORZ = 0x7, // 7
123     DWRITE_PANOSE_ARM_STYLE_BENT_ARMS_WEDGE = 0x8, // 8
124     DWRITE_PANOSE_ARM_STYLE_BENT_ARMS_VERT = 0x9, // 9
125     DWRITE_PANOSE_ARM_STYLE_BENT_ARMS_SINGLE_SERIF = 0xA, // 10
126     DWRITE_PANOSE_ARM_STYLE_BENT_ARMS_DOUBLE_SERIF = 0xB, // 11
127 }}
128 ENUM!{enum DWRITE_PANOSE_LETTERFORM {
129     DWRITE_PANOSE_LETTERFORM_ANY = 0x0, // 0
130     DWRITE_PANOSE_LETTERFORM_NO_FIT = 0x1, // 1
131     DWRITE_PANOSE_LETTERFORM_NORMAL_CONTACT = 0x2, // 2
132     DWRITE_PANOSE_LETTERFORM_NORMAL_WEIGHTED = 0x3, // 3
133     DWRITE_PANOSE_LETTERFORM_NORMAL_BOXED = 0x4, // 4
134     DWRITE_PANOSE_LETTERFORM_NORMAL_FLATTENED = 0x5, // 5
135     DWRITE_PANOSE_LETTERFORM_NORMAL_ROUNDED = 0x6, // 6
136     DWRITE_PANOSE_LETTERFORM_NORMAL_OFF_CENTER = 0x7, // 7
137     DWRITE_PANOSE_LETTERFORM_NORMAL_SQUARE = 0x8, // 8
138     DWRITE_PANOSE_LETTERFORM_OBLIQUE_CONTACT = 0x9, // 9
139     DWRITE_PANOSE_LETTERFORM_OBLIQUE_WEIGHTED = 0xA, // 10
140     DWRITE_PANOSE_LETTERFORM_OBLIQUE_BOXED = 0xB, // 11
141     DWRITE_PANOSE_LETTERFORM_OBLIQUE_FLATTENED = 0xC, // 12
142     DWRITE_PANOSE_LETTERFORM_OBLIQUE_ROUNDED = 0xD, // 13
143     DWRITE_PANOSE_LETTERFORM_OBLIQUE_OFF_CENTER = 0xE, // 14
144     DWRITE_PANOSE_LETTERFORM_OBLIQUE_SQUARE = 0xF, // 15
145 }}
146 ENUM!{enum DWRITE_PANOSE_MIDLINE {
147     DWRITE_PANOSE_MIDLINE_ANY = 0x0, // 0
148     DWRITE_PANOSE_MIDLINE_NO_FIT = 0x1, // 1
149     DWRITE_PANOSE_MIDLINE_STANDARD_TRIMMED = 0x2, // 2
150     DWRITE_PANOSE_MIDLINE_STANDARD_POINTED = 0x3, // 3
151     DWRITE_PANOSE_MIDLINE_STANDARD_SERIFED = 0x4, // 4
152     DWRITE_PANOSE_MIDLINE_HIGH_TRIMMED = 0x5, // 5
153     DWRITE_PANOSE_MIDLINE_HIGH_POINTED = 0x6, // 6
154     DWRITE_PANOSE_MIDLINE_HIGH_SERIFED = 0x7, // 7
155     DWRITE_PANOSE_MIDLINE_CONSTANT_TRIMMED = 0x8, // 8
156     DWRITE_PANOSE_MIDLINE_CONSTANT_POINTED = 0x9, // 9
157     DWRITE_PANOSE_MIDLINE_CONSTANT_SERIFED = 0xA, // 10
158     DWRITE_PANOSE_MIDLINE_LOW_TRIMMED = 0xB, // 11
159     DWRITE_PANOSE_MIDLINE_LOW_POINTED = 0xC, // 12
160     DWRITE_PANOSE_MIDLINE_LOW_SERIFED = 0xD, // 13
161 }}
162 ENUM!{enum DWRITE_PANOSE_XHEIGHT {
163     DWRITE_PANOSE_XHEIGHT_ANY = 0x0, // 0
164     DWRITE_PANOSE_XHEIGHT_NO_FIT = 0x1, // 1
165     DWRITE_PANOSE_XHEIGHT_CONSTANT_SMALL = 0x2, // 2
166     DWRITE_PANOSE_XHEIGHT_CONSTANT_STANDARD = 0x3, // 3
167     DWRITE_PANOSE_XHEIGHT_CONSTANT_LARGE = 0x4, // 4
168     DWRITE_PANOSE_XHEIGHT_DUCKING_SMALL = 0x5, // 5
169     DWRITE_PANOSE_XHEIGHT_DUCKING_STANDARD = 0x6, // 6
170     DWRITE_PANOSE_XHEIGHT_DUCKING_LARGE = 0x7, // 7
171     DWRITE_PANOSE_XHEIGHT_CONSTANT_STD = 0x3, // 3
172     DWRITE_PANOSE_XHEIGHT_DUCKING_STD = 0x6, // 6
173 }}
174 ENUM!{enum DWRITE_PANOSE_TOOL_KIND {
175     DWRITE_PANOSE_TOOL_KIND_ANY = 0x0, // 0
176     DWRITE_PANOSE_TOOL_KIND_NO_FIT = 0x1, // 1
177     DWRITE_PANOSE_TOOL_KIND_FLAT_NIB = 0x2, // 2
178     DWRITE_PANOSE_TOOL_KIND_PRESSURE_POINT = 0x3, // 3
179     DWRITE_PANOSE_TOOL_KIND_ENGRAVED = 0x4, // 4
180     DWRITE_PANOSE_TOOL_KIND_BALL = 0x5, // 5
181     DWRITE_PANOSE_TOOL_KIND_BRUSH = 0x6, // 6
182     DWRITE_PANOSE_TOOL_KIND_ROUGH = 0x7, // 7
183     DWRITE_PANOSE_TOOL_KIND_FELT_PEN_BRUSH_TIP = 0x8, // 8
184     DWRITE_PANOSE_TOOL_KIND_WILD_BRUSH = 0x9, // 9
185 }}
186 ENUM!{enum DWRITE_PANOSE_SPACING {
187     DWRITE_PANOSE_SPACING_ANY = 0x0, // 0
188     DWRITE_PANOSE_SPACING_NO_FIT = 0x1, // 1
189     DWRITE_PANOSE_SPACING_PROPORTIONAL_SPACED = 0x2, // 2
190     DWRITE_PANOSE_SPACING_MONOSPACED = 0x3, // 3
191 }}
192 ENUM!{enum DWRITE_PANOSE_ASPECT_RATIO {
193     DWRITE_PANOSE_ASPECT_RATIO_ANY = 0x0, // 0
194     DWRITE_PANOSE_ASPECT_RATIO_NO_FIT = 0x1, // 1
195     DWRITE_PANOSE_ASPECT_RATIO_VERY_CONDENSED = 0x2, // 2
196     DWRITE_PANOSE_ASPECT_RATIO_CONDENSED = 0x3, // 3
197     DWRITE_PANOSE_ASPECT_RATIO_NORMAL = 0x4, // 4
198     DWRITE_PANOSE_ASPECT_RATIO_EXPANDED = 0x5, // 5
199     DWRITE_PANOSE_ASPECT_RATIO_VERY_EXPANDED = 0x6, // 6
200 }}
201 ENUM!{enum DWRITE_PANOSE_SCRIPT_TOPOLOGY {
202     DWRITE_PANOSE_SCRIPT_TOPOLOGY_ANY = 0x0, // 0
203     DWRITE_PANOSE_SCRIPT_TOPOLOGY_NO_FIT = 0x1, // 1
204     DWRITE_PANOSE_SCRIPT_TOPOLOGY_ROMAN_DISCONNECTED = 0x2, // 2
205     DWRITE_PANOSE_SCRIPT_TOPOLOGY_ROMAN_TRAILING = 0x3, // 3
206     DWRITE_PANOSE_SCRIPT_TOPOLOGY_ROMAN_CONNECTED = 0x4, // 4
207     DWRITE_PANOSE_SCRIPT_TOPOLOGY_CURSIVE_DISCONNECTED = 0x5, // 5
208     DWRITE_PANOSE_SCRIPT_TOPOLOGY_CURSIVE_TRAILING = 0x6, // 6
209     DWRITE_PANOSE_SCRIPT_TOPOLOGY_CURSIVE_CONNECTED = 0x7, // 7
210     DWRITE_PANOSE_SCRIPT_TOPOLOGY_BLACKLETTER_DISCONNECTED = 0x8, // 8
211     DWRITE_PANOSE_SCRIPT_TOPOLOGY_BLACKLETTER_TRAILING = 0x9, // 9
212     DWRITE_PANOSE_SCRIPT_TOPOLOGY_BLACKLETTER_CONNECTED = 0xA, // 10
213 }}
214 ENUM!{enum DWRITE_PANOSE_SCRIPT_FORM {
215     DWRITE_PANOSE_SCRIPT_FORM_ANY = 0x0, // 0
216     DWRITE_PANOSE_SCRIPT_FORM_NO_FIT = 0x1, // 1
217     DWRITE_PANOSE_SCRIPT_FORM_UPRIGHT_NO_WRAPPING = 0x2, // 2
218     DWRITE_PANOSE_SCRIPT_FORM_UPRIGHT_SOME_WRAPPING = 0x3, // 3
219     DWRITE_PANOSE_SCRIPT_FORM_UPRIGHT_MORE_WRAPPING = 0x4, // 4
220     DWRITE_PANOSE_SCRIPT_FORM_UPRIGHT_EXTREME_WRAPPING = 0x5, // 5
221     DWRITE_PANOSE_SCRIPT_FORM_OBLIQUE_NO_WRAPPING = 0x6, // 6
222     DWRITE_PANOSE_SCRIPT_FORM_OBLIQUE_SOME_WRAPPING = 0x7, // 7
223     DWRITE_PANOSE_SCRIPT_FORM_OBLIQUE_MORE_WRAPPING = 0x8, // 8
224     DWRITE_PANOSE_SCRIPT_FORM_OBLIQUE_EXTREME_WRAPPING = 0x9, // 9
225     DWRITE_PANOSE_SCRIPT_FORM_EXAGGERATED_NO_WRAPPING = 0xA, // 10
226     DWRITE_PANOSE_SCRIPT_FORM_EXAGGERATED_SOME_WRAPPING = 0xB, // 11
227     DWRITE_PANOSE_SCRIPT_FORM_EXAGGERATED_MORE_WRAPPING = 0xC, // 12
228     DWRITE_PANOSE_SCRIPT_FORM_EXAGGERATED_EXTREME_WRAPPING = 0xD, // 13
229 }}
230 ENUM!{enum DWRITE_PANOSE_FINIALS {
231     DWRITE_PANOSE_FINIALS_ANY = 0x0, // 0
232     DWRITE_PANOSE_FINIALS_NO_FIT = 0x1, // 1
233     DWRITE_PANOSE_FINIALS_NONE_NO_LOOPS = 0x2, // 2
234     DWRITE_PANOSE_FINIALS_NONE_CLOSED_LOOPS = 0x3, // 3
235     DWRITE_PANOSE_FINIALS_NONE_OPEN_LOOPS = 0x4, // 4
236     DWRITE_PANOSE_FINIALS_SHARP_NO_LOOPS = 0x5, // 5
237     DWRITE_PANOSE_FINIALS_SHARP_CLOSED_LOOPS = 0x6, // 6
238     DWRITE_PANOSE_FINIALS_SHARP_OPEN_LOOPS = 0x7, // 7
239     DWRITE_PANOSE_FINIALS_TAPERED_NO_LOOPS = 0x8, // 8
240     DWRITE_PANOSE_FINIALS_TAPERED_CLOSED_LOOPS = 0x9, // 9
241     DWRITE_PANOSE_FINIALS_TAPERED_OPEN_LOOPS = 0xA, // 10
242     DWRITE_PANOSE_FINIALS_ROUND_NO_LOOPS = 0xB, // 11
243     DWRITE_PANOSE_FINIALS_ROUND_CLOSED_LOOPS = 0xC, // 12
244     DWRITE_PANOSE_FINIALS_ROUND_OPEN_LOOPS = 0xD, // 13
245 }}
246 ENUM!{enum DWRITE_PANOSE_XASCENT {
247     DWRITE_PANOSE_XASCENT_ANY = 0x0, // 0
248     DWRITE_PANOSE_XASCENT_NO_FIT = 0x1, // 1
249     DWRITE_PANOSE_XASCENT_VERY_LOW = 0x2, // 2
250     DWRITE_PANOSE_XASCENT_LOW = 0x3, // 3
251     DWRITE_PANOSE_XASCENT_MEDIUM = 0x4, // 4
252     DWRITE_PANOSE_XASCENT_HIGH = 0x5, // 5
253     DWRITE_PANOSE_XASCENT_VERY_HIGH = 0x6, // 6
254 }}
255 ENUM!{enum DWRITE_PANOSE_DECORATIVE_CLASS {
256     DWRITE_PANOSE_DECORATIVE_CLASS_ANY = 0x0, // 0
257     DWRITE_PANOSE_DECORATIVE_CLASS_NO_FIT = 0x1, // 1
258     DWRITE_PANOSE_DECORATIVE_CLASS_DERIVATIVE = 0x2, // 2
259     DWRITE_PANOSE_DECORATIVE_CLASS_NONSTANDARD_TOPOLOGY = 0x3, // 3
260     DWRITE_PANOSE_DECORATIVE_CLASS_NONSTANDARD_ELEMENTS = 0x4, // 4
261     DWRITE_PANOSE_DECORATIVE_CLASS_NONSTANDARD_ASPECT = 0x5, // 5
262     DWRITE_PANOSE_DECORATIVE_CLASS_INITIALS = 0x6, // 6
263     DWRITE_PANOSE_DECORATIVE_CLASS_CARTOON = 0x7, // 7
264     DWRITE_PANOSE_DECORATIVE_CLASS_PICTURE_STEMS = 0x8, // 8
265     DWRITE_PANOSE_DECORATIVE_CLASS_ORNAMENTED = 0x9, // 9
266     DWRITE_PANOSE_DECORATIVE_CLASS_TEXT_AND_BACKGROUND = 0xA, // 10
267     DWRITE_PANOSE_DECORATIVE_CLASS_COLLAGE = 0xB, // 11
268     DWRITE_PANOSE_DECORATIVE_CLASS_MONTAGE = 0xC, // 12
269 }}
270 ENUM!{enum DWRITE_PANOSE_ASPECT {
271     DWRITE_PANOSE_ASPECT_ANY = 0x0, // 0
272     DWRITE_PANOSE_ASPECT_NO_FIT = 0x1, // 1
273     DWRITE_PANOSE_ASPECT_SUPER_CONDENSED = 0x2, // 2
274     DWRITE_PANOSE_ASPECT_VERY_CONDENSED = 0x3, // 3
275     DWRITE_PANOSE_ASPECT_CONDENSED = 0x4, // 4
276     DWRITE_PANOSE_ASPECT_NORMAL = 0x5, // 5
277     DWRITE_PANOSE_ASPECT_EXTENDED = 0x6, // 6
278     DWRITE_PANOSE_ASPECT_VERY_EXTENDED = 0x7, // 7
279     DWRITE_PANOSE_ASPECT_SUPER_EXTENDED = 0x8, // 8
280     DWRITE_PANOSE_ASPECT_MONOSPACED = 0x9, // 9
281 }}
282 ENUM!{enum DWRITE_PANOSE_FILL {
283     DWRITE_PANOSE_FILL_ANY = 0x0, // 0
284     DWRITE_PANOSE_FILL_NO_FIT = 0x1, // 1
285     DWRITE_PANOSE_FILL_STANDARD_SOLID_FILL = 0x2, // 2
286     DWRITE_PANOSE_FILL_NO_FILL = 0x3, // 3
287     DWRITE_PANOSE_FILL_PATTERNED_FILL = 0x4, // 4
288     DWRITE_PANOSE_FILL_COMPLEX_FILL = 0x5, // 5
289     DWRITE_PANOSE_FILL_SHAPED_FILL = 0x6, // 6
290     DWRITE_PANOSE_FILL_DRAWN_DISTRESSED = 0x7, // 7
291 }}
292 ENUM!{enum DWRITE_PANOSE_LINING {
293     DWRITE_PANOSE_LINING_ANY = 0x0, // 0
294     DWRITE_PANOSE_LINING_NO_FIT = 0x1, // 1
295     DWRITE_PANOSE_LINING_NONE = 0x2, // 2
296     DWRITE_PANOSE_LINING_INLINE = 0x3, // 3
297     DWRITE_PANOSE_LINING_OUTLINE = 0x4, // 4
298     DWRITE_PANOSE_LINING_ENGRAVED = 0x5, // 5
299     DWRITE_PANOSE_LINING_SHADOW = 0x6, // 6
300     DWRITE_PANOSE_LINING_RELIEF = 0x7, // 7
301     DWRITE_PANOSE_LINING_BACKDROP = 0x8, // 8
302 }}
303 ENUM!{enum DWRITE_PANOSE_DECORATIVE_TOPOLOGY {
304     DWRITE_PANOSE_DECORATIVE_TOPOLOGY_ANY = 0x0, // 0
305     DWRITE_PANOSE_DECORATIVE_TOPOLOGY_NO_FIT = 0x1, // 1
306     DWRITE_PANOSE_DECORATIVE_TOPOLOGY_STANDARD = 0x2, // 2
307     DWRITE_PANOSE_DECORATIVE_TOPOLOGY_SQUARE = 0x3, // 3
308     DWRITE_PANOSE_DECORATIVE_TOPOLOGY_MULTIPLE_SEGMENT = 0x4, // 4
309     DWRITE_PANOSE_DECORATIVE_TOPOLOGY_ART_DECO = 0x5, // 5
310     DWRITE_PANOSE_DECORATIVE_TOPOLOGY_UNEVEN_WEIGHTING = 0x6, // 6
311     DWRITE_PANOSE_DECORATIVE_TOPOLOGY_DIVERSE_ARMS = 0x7, // 7
312     DWRITE_PANOSE_DECORATIVE_TOPOLOGY_DIVERSE_FORMS = 0x8, // 8
313     DWRITE_PANOSE_DECORATIVE_TOPOLOGY_LOMBARDIC_FORMS = 0x9, // 9
314     DWRITE_PANOSE_DECORATIVE_TOPOLOGY_UPPER_CASE_IN_LOWER_CASE = 0xA, // 10
315     DWRITE_PANOSE_DECORATIVE_TOPOLOGY_IMPLIED_TOPOLOGY = 0xB, // 11
316     DWRITE_PANOSE_DECORATIVE_TOPOLOGY_HORSESHOE_E_AND_A = 0xC, // 12
317     DWRITE_PANOSE_DECORATIVE_TOPOLOGY_CURSIVE = 0xD, // 13
318     DWRITE_PANOSE_DECORATIVE_TOPOLOGY_BLACKLETTER = 0xE, // 14
319     DWRITE_PANOSE_DECORATIVE_TOPOLOGY_SWASH_VARIANCE = 0xF, // 15
320 }}
321 ENUM!{enum DWRITE_PANOSE_CHARACTER_RANGES {
322     DWRITE_PANOSE_CHARACTER_RANGES_ANY = 0x0, // 0
323     DWRITE_PANOSE_CHARACTER_RANGES_NO_FIT = 0x1, // 1
324     DWRITE_PANOSE_CHARACTER_RANGES_EXTENDED_COLLECTION = 0x2, // 2
325     DWRITE_PANOSE_CHARACTER_RANGES_LITERALS = 0x3, // 3
326     DWRITE_PANOSE_CHARACTER_RANGES_NO_LOWER_CASE = 0x4, // 4
327     DWRITE_PANOSE_CHARACTER_RANGES_SMALL_CAPS = 0x5, // 5
328 }}
329 ENUM!{enum DWRITE_PANOSE_SYMBOL_KIND {
330     DWRITE_PANOSE_SYMBOL_KIND_ANY = 0x0, // 0
331     DWRITE_PANOSE_SYMBOL_KIND_NO_FIT = 0x1, // 1
332     DWRITE_PANOSE_SYMBOL_KIND_MONTAGES = 0x2, // 2
333     DWRITE_PANOSE_SYMBOL_KIND_PICTURES = 0x3, // 3
334     DWRITE_PANOSE_SYMBOL_KIND_SHAPES = 0x4, // 4
335     DWRITE_PANOSE_SYMBOL_KIND_SCIENTIFIC = 0x5, // 5
336     DWRITE_PANOSE_SYMBOL_KIND_MUSIC = 0x6, // 6
337     DWRITE_PANOSE_SYMBOL_KIND_EXPERT = 0x7, // 7
338     DWRITE_PANOSE_SYMBOL_KIND_PATTERNS = 0x8, // 8
339     DWRITE_PANOSE_SYMBOL_KIND_BOARDERS = 0x9, // 9
340     DWRITE_PANOSE_SYMBOL_KIND_ICONS = 0xA, // 10
341     DWRITE_PANOSE_SYMBOL_KIND_LOGOS = 0xB, // 11
342     DWRITE_PANOSE_SYMBOL_KIND_INDUSTRY_SPECIFIC = 0xC, // 12
343 }}
344 ENUM!{enum DWRITE_PANOSE_SYMBOL_ASPECT_RATIO {
345     DWRITE_PANOSE_SYMBOL_ASPECT_RATIO_ANY = 0x0, // 0
346     DWRITE_PANOSE_SYMBOL_ASPECT_RATIO_NO_FIT = 0x1, // 1
347     DWRITE_PANOSE_SYMBOL_ASPECT_RATIO_NO_WIDTH = 0x2, // 2
348     DWRITE_PANOSE_SYMBOL_ASPECT_RATIO_EXCEPTIONALLY_WIDE = 0x3, // 3
349     DWRITE_PANOSE_SYMBOL_ASPECT_RATIO_SUPER_WIDE = 0x4, // 4
350     DWRITE_PANOSE_SYMBOL_ASPECT_RATIO_VERY_WIDE = 0x5, // 5
351     DWRITE_PANOSE_SYMBOL_ASPECT_RATIO_WIDE = 0x6, // 6
352     DWRITE_PANOSE_SYMBOL_ASPECT_RATIO_NORMAL = 0x7, // 7
353     DWRITE_PANOSE_SYMBOL_ASPECT_RATIO_NARROW = 0x8, // 8
354     DWRITE_PANOSE_SYMBOL_ASPECT_RATIO_VERY_NARROW = 0x9, // 9
355 }}
356 ENUM!{enum DWRITE_OUTLINE_THRESHOLD {
357     DWRITE_OUTLINE_THRESHOLD_ANTIALIASED = 0x0, // 0
358     DWRITE_OUTLINE_THRESHOLD_ALIASED = 0x1, // 1
359 }}
360 ENUM!{enum DWRITE_BASELINE {
361     DWRITE_BASELINE_DEFAULT = 0x0, // 0
362     DWRITE_BASELINE_ROMAN = 0x1, // 1
363     DWRITE_BASELINE_CENTRAL = 0x2, // 2
364     DWRITE_BASELINE_MATH = 0x3, // 3
365     DWRITE_BASELINE_HANGING = 0x4, // 4
366     DWRITE_BASELINE_IDEOGRAPHIC_BOTTOM = 0x5, // 5
367     DWRITE_BASELINE_IDEOGRAPHIC_TOP = 0x6, // 6
368     DWRITE_BASELINE_MINIMUM = 0x7, // 7
369     DWRITE_BASELINE_MAXIMUM = 0x8, // 8
370 }}
371 ENUM!{enum DWRITE_VERTICAL_GLYPH_ORIENTATION {
372     DWRITE_VERTICAL_GLYPH_ORIENTATION_DEFAULT = 0x0, // 0
373     DWRITE_VERTICAL_GLYPH_ORIENTATION_STACKED = 0x1, // 1
374 }}
375 ENUM!{enum DWRITE_GLYPH_ORIENTATION_ANGLE {
376     DWRITE_GLYPH_ORIENTATION_ANGLE_0_DEGREES = 0x0, // 0
377     DWRITE_GLYPH_ORIENTATION_ANGLE_90_DEGREES = 0x1, // 1
378     DWRITE_GLYPH_ORIENTATION_ANGLE_180_DEGREES = 0x2, // 2
379     DWRITE_GLYPH_ORIENTATION_ANGLE_270_DEGREES = 0x3, // 3
380 }}
381 STRUCT!{struct DWRITE_FONT_METRICS1 {
382     designUnitsPerEm: UINT16,
383     ascent: UINT16,
384     descent: UINT16,
385     lineGap: INT16,
386     capHeight: UINT16,
387     xHeight: UINT16,
388     underlinePosition: INT16,
389     underlineThickness: UINT16,
390     strikethroughPosition: INT16,
391     strikethroughThickness: UINT16,
392     glyphBoxLeft: INT16,
393     glyphBoxTop: INT16,
394     glyphBoxRight: INT16,
395     glyphBoxBottom: INT16,
396     subscriptPositionX: INT16,
397     subscriptPositionY: INT16,
398     subscriptSizeX: INT16,
399     subscriptSizeY: INT16,
400     superscriptPositionX: INT16,
401     superscriptPositionY: INT16,
402     superscriptSizeX: INT16,
403     superscriptSizeY: INT16,
404     hasTypographicMetrics: BOOL,
405 }}
406 STRUCT!{struct DWRITE_CARET_METRICS {
407     slopeRise: INT16,
408     slopeRun: INT16,
409     offset: INT16,
410 }}
411 STRUCT!{struct DWRITE_PANOSE_text {
412     familyKind: UINT8,
413     serifStyle: UINT8,
414     weight: UINT8,
415     proportion: UINT8,
416     contrast: UINT8,
417     strokeVariation: UINT8,
418     armStyle: UINT8,
419     letterform: UINT8,
420     midline: UINT8,
421     xHeight: UINT8,
422 }}
423 STRUCT!{struct DWRITE_PANOSE_script {
424     familyKind: UINT8,
425     toolKind: UINT8,
426     weight: UINT8,
427     spacing: UINT8,
428     aspectRatio: UINT8,
429     contrast: UINT8,
430     scriptTopology: UINT8,
431     scriptForm: UINT8,
432     finials: UINT8,
433     xAscent: UINT8,
434 }}
435 STRUCT!{struct DWRITE_PANOSE_decorative {
436     familyKind: UINT8,
437     decorativeClass: UINT8,
438     weight: UINT8,
439     aspect: UINT8,
440     contrast: UINT8,
441     serifVariant: UINT8,
442     fill: UINT8,
443     lining: UINT8,
444     decorativeTopology: UINT8,
445     characterRange: UINT8,
446 }}
447 STRUCT!{struct DWRITE_PANOSE_symbol {
448     familyKind: UINT8,
449     symbolKind: UINT8,
450     weight: UINT8,
451     spacing: UINT8,
452     aspectRatioAndContrast: UINT8,
453     aspectRatio94: UINT8,
454     aspectRatio119: UINT8,
455     aspectRatio157: UINT8,
456     aspectRatio163: UINT8,
457     aspectRatio211: UINT8,
458 }}
459 UNION!{union DWRITE_PANOSE {
460     [u8; 10],
461     values values_mut: [UINT8; 10],
462     familyKind familyKind_mut: UINT8,
463     text text_mut: DWRITE_PANOSE_text,
464     script script_mut: DWRITE_PANOSE_script,
465     decorative decorative_mut: DWRITE_PANOSE_decorative,
466     symbol symbol_mut: DWRITE_PANOSE_symbol,
467 }}
468 STRUCT!{struct DWRITE_UNICODE_RANGE {
469     first: UINT32,
470     last: UINT32,
471 }}
472 STRUCT!{struct DWRITE_SCRIPT_PROPERTIES {
473     isoScriptCode: UINT32,
474     isoScriptNumber: UINT32,
475     clusterLookahead: UINT32,
476     justificationCharacter: UINT32,
477     bitfield0: UINT32,
478 }}
479 BITFIELD!{DWRITE_SCRIPT_PROPERTIES bitfield0: UINT32 [
480     restrictCaretToClusters set_restrictCaretToClusters[0..1],
481     usesWordDividers set_usesWordDividers[1..2],
482     isDiscreteWriting set_isDiscreteWriting[2..3],
483     isBlockWriting set_isBlockWriting[3..4],
484     isDistributedWithinCluster set_isDistributedWithinCluster[4..5],
485     isConnectedWriting set_isConnectedWriting[5..6],
486     isCursiveWriting set_isCursiveWriting[6..7],
487     reserved set_reserved[7..32],
488 ]}
489 STRUCT!{struct DWRITE_JUSTIFICATION_OPPORTUNITY {
490     expansionMinimum: FLOAT,
491     expansionMaximum: FLOAT,
492     compressionMaximum: FLOAT,
493     bitfield0: UINT32,
494 }}
495 BITFIELD!{DWRITE_JUSTIFICATION_OPPORTUNITY bitfield0: UINT32 [
496     expansionPriority set_expansionPriority[0..8],
497     compressionPriority set_compressionPriority[8..16],
498     allowResidualExpansion set_allowResidualExpansion[16..17],
499     allowResidualCompression set_allowResidualCompression[17..18],
500     applyToLeadingEdge set_applyToLeadingEdge[18..19],
501     applyToTrailingEdge set_applyToTrailingEdge[19..20],
502     reserved set_reserved[20..32],
503 ]}
504 RIDL!{#[uuid(0x30572f99, 0xdac6, 0x41db, 0xa1, 0x6e, 0x04, 0x86, 0x30, 0x7e, 0x60, 0x6a)]
505 interface IDWriteFactory1(IDWriteFactory1Vtbl): IDWriteFactory(IDWriteFactoryVtbl) {
506     fn GetEudcFontCollection(
507         fontCollection: *mut *mut IDWriteFontCollection,
508         checkForUpdates: BOOL,
509     ) -> HRESULT,
510     fn CreateCustomRenderingParams(
511         gamma: FLOAT,
512         enhancedContrast: FLOAT,
513         enhancedContrastGrayscale: FLOAT,
514         clearTypeLevel: FLOAT,
515         pixelGeometry: DWRITE_PIXEL_GEOMETRY,
516         renderingMode: DWRITE_RENDERING_MODE,
517         renderingParams: *mut *mut IDWriteRenderingParams1,
518     ) -> HRESULT,
519 }}
520 RIDL!{#[uuid(0xa71efdb4, 0x9fdb, 0x4838, 0xad, 0x90, 0xcf, 0xc3, 0xbe, 0x8c, 0x3d, 0xaf)]
521 interface IDWriteFontFace1(IDWriteFontFace1Vtbl): IDWriteFontFace(IDWriteFontFaceVtbl) {
522     fn GetMetrics(
523         fontMetrics: *mut DWRITE_FONT_METRICS1,
524     ) -> (),
525     fn GetGdiCompatibleMetrics(
526         emSize: FLOAT,
527         pixelsPerDip: FLOAT,
528         transform: *const DWRITE_MATRIX,
529         fontMetrics: *mut DWRITE_FONT_METRICS1,
530     ) -> HRESULT,
531     fn GetCaretMetrics(
532         caretMetrics: *mut DWRITE_CARET_METRICS,
533     ) -> (),
534     fn GetUnicodeRanges(
535         maxRangeCount: UINT32,
536         unicodeRanges: *mut DWRITE_UNICODE_RANGE,
537         actualRangeCount: *mut UINT32,
538     ) -> HRESULT,
539     fn IsMonospacedFont() -> BOOL,
540     fn GetDesignGlyphAdvances(
541         glyphCount: UINT32,
542         glyphIndices: *const UINT16,
543         glyphAdvances: *mut INT32,
544         isSideways: BOOL,
545     ) -> HRESULT,
546     fn GetGdiCompatibleGlyphAdvances(
547         emSize: FLOAT,
548         pixelsPerDip: FLOAT,
549         transform: *const DWRITE_MATRIX,
550         useGdiNatural: BOOL,
551         isSideways: BOOL,
552         glyphCount: UINT32,
553         glyphIndices: *const UINT16,
554         glyphAdvances: *mut INT32,
555     ) -> HRESULT,
556     fn GetKerningPairAdjustments(
557         glyphCount: UINT32,
558         glyphIndices: *const UINT16,
559         glyphAdvanceAdjustments: *mut INT32,
560     ) -> HRESULT,
561     fn HasKerningPairs() -> BOOL,
562     fn GetRecommendedRenderingMode(
563         fontEmSize: FLOAT,
564         dpiX: FLOAT,
565         dpiY: FLOAT,
566         transform: *const DWRITE_MATRIX,
567         isSideways: BOOL,
568         outlineThreshold: DWRITE_OUTLINE_THRESHOLD,
569         measuringMode: DWRITE_MEASURING_MODE,
570         renderingMode: *mut DWRITE_RENDERING_MODE,
571     ) -> HRESULT,
572     fn GetVerticalGlyphVariants(
573         glyphCount: UINT32,
574         nominalGlyphIndices: *const UINT16,
575         verticalGlyphIndices: *mut UINT16,
576     ) -> HRESULT,
577     fn HasVerticalGlyphVariants() -> BOOL,
578 }}
579 RIDL!{#[uuid(0xacd16696, 0x8c14, 0x4f5d, 0x87, 0x7e, 0xfe, 0x3f, 0xc1, 0xd3, 0x27, 0x38)]
580 interface IDWriteFont1(IDWriteFont1Vtbl): IDWriteFont(IDWriteFontVtbl) {
581     fn GetMetrics(
582         fontMetrics: *mut DWRITE_FONT_METRICS1,
583     ) -> (),
584     fn GetPanose(
585         panose: *mut DWRITE_PANOSE,
586     ) -> (),
587     fn GetUnicodeRanges(
588         maxRangeCount: UINT32,
589         unicodeRanges: *mut DWRITE_UNICODE_RANGE,
590         actualRangeCount: *mut UINT32,
591     ) -> HRESULT,
592     fn IsMonospacedFont() -> BOOL,
593 }}
594 RIDL!{#[uuid(0x94413cf4, 0xa6fc, 0x4248, 0x8b, 0x50, 0x66, 0x74, 0x34, 0x8f, 0xca, 0xd3)]
595 interface IDWriteRenderingParams1(IDWriteRenderingParams1Vtbl):
596     IDWriteRenderingParams(IDWriteRenderingParamsVtbl) {
597     fn GetGrayscaleEnhancedContrast() -> FLOAT,
598 }}
599 RIDL!{#[uuid(0x80dad800, 0xe21f, 0x4e83, 0x96, 0xce, 0xbf, 0xcc, 0xe5, 0x00, 0xdb, 0x7c)]
600 interface IDWriteTextAnalyzer1(IDWriteTextAnalyzer1Vtbl):
601     IDWriteTextAnalyzer(IDWriteTextAnalyzerVtbl) {
602     fn ApplyCharacterSpacing(
603         leadingSpacing: FLOAT,
604         trailingSpacing: FLOAT,
605         minimumAdvanceWidth: FLOAT,
606         textLength: UINT32,
607         glyphCount: UINT32,
608         clusterMap: *const UINT16,
609         glyphAdvances: *const FLOAT,
610         glyphOffsets: *const DWRITE_GLYPH_OFFSET,
611         glyphProperties: *const DWRITE_SHAPING_GLYPH_PROPERTIES,
612         modifiedGlyphAdvances: *mut FLOAT,
613         modifiedGlyphOffsets: *mut DWRITE_GLYPH_OFFSET,
614     ) -> HRESULT,
615     fn GetBaseline(
616         fontFace: *mut IDWriteFontFace,
617         baseline: DWRITE_BASELINE,
618         isVertical: BOOL,
619         isSimulationAllowed: BOOL,
620         scriptAnalysis: DWRITE_SCRIPT_ANALYSIS,
621         localeName: *const WCHAR,
622         baselineCoordinate: *mut INT32,
623         exists: *mut BOOL,
624     ) -> HRESULT,
625     fn AnalyzeVerticalGlyphOrientation(
626         analysisSource: *mut IDWriteTextAnalysisSource1,
627         textPosition: UINT32,
628         textLength: UINT32,
629         analysisSink: *mut IDWriteTextAnalysisSink1,
630     ) -> HRESULT,
631     fn GetGlyphOrientationTransform(
632         glyphOrientationAngle: DWRITE_GLYPH_ORIENTATION_ANGLE,
633         isSideways: BOOL,
634         transform: *mut DWRITE_MATRIX,
635     ) -> HRESULT,
636     fn GetScriptProperties(
637         scriptAnalysis: DWRITE_SCRIPT_ANALYSIS,
638         scriptProperties: *mut DWRITE_SCRIPT_PROPERTIES,
639     ) -> HRESULT,
640     fn GetTextComplexity(
641         textString: *const WCHAR,
642         textLength: UINT32,
643         fontFace: *mut IDWriteFontFace,
644         isTextSimple: *mut BOOL,
645         textLengthRead: *mut UINT32,
646         glyphIndices: *mut UINT16,
647     ) -> HRESULT,
648     fn GetJustificationOpportunities(
649         fontFace: *mut IDWriteFontFace,
650         fontEmSize: FLOAT,
651         scriptAnalysis: DWRITE_SCRIPT_ANALYSIS,
652         textLength: UINT32,
653         glyphCount: UINT32,
654         textString: *const WCHAR,
655         clusterMap: *const UINT16,
656         glyphProperties: *const DWRITE_SHAPING_GLYPH_PROPERTIES,
657         justificationOpportunities: *mut DWRITE_JUSTIFICATION_OPPORTUNITY,
658     ) -> HRESULT,
659     fn JustifyGlyphAdvances(
660         lineWidth: FLOAT,
661         glyphCount: UINT32,
662         justificationOpportunities: *const DWRITE_JUSTIFICATION_OPPORTUNITY,
663         glyphAdvances: *const FLOAT,
664         glyphOffsets: *const DWRITE_GLYPH_OFFSET,
665         justifiedGlyphAdvances: *mut FLOAT,
666         justifiedGlyphOffsets: *mut DWRITE_GLYPH_OFFSET,
667     ) -> HRESULT,
668     fn GetJustifiedGlyphs(
669         fontFace: *mut IDWriteFontFace,
670         fontEmSize: FLOAT,
671         scriptAnalysis: DWRITE_SCRIPT_ANALYSIS,
672         textLength: UINT32,
673         glyphCount: UINT32,
674         maxGlyphCount: UINT32,
675         clusterMap: *const UINT16,
676         glyphIndices: *const UINT16,
677         glyphAdvances: *const FLOAT,
678         justifiedGlyphAdvances: *const FLOAT,
679         justifiedGlyphOffsets: *const DWRITE_GLYPH_OFFSET,
680         glyphProperties: *const DWRITE_SHAPING_GLYPH_PROPERTIES,
681         actualGlyphCount: *mut UINT32,
682         modifiedClusterMap: *mut UINT16,
683         modifiedGlyphIndices: *mut UINT16,
684         modifiedGlyphAdvances: *mut FLOAT,
685         modifiedGlyphOffsets: *mut DWRITE_GLYPH_OFFSET,
686     ) -> HRESULT,
687 }}
688 RIDL!{#[uuid(0x639cfad8, 0x0fb4, 0x4b21, 0xa5, 0x8a, 0x06, 0x79, 0x20, 0x12, 0x00, 0x09)]
689 interface IDWriteTextAnalysisSource1(IDWriteTextAnalysisSource1Vtbl):
690     IDWriteTextAnalysisSource(IDWriteTextAnalysisSourceVtbl) {
691     fn GetVerticalGlyphOrientation(
692         textPosition: UINT32,
693         textLength: *mut UINT32,
694         glyphOrientation: *mut DWRITE_VERTICAL_GLYPH_ORIENTATION,
695         bidiLevel: *mut UINT8,
696     ) -> HRESULT,
697 }}
698 RIDL!{#[uuid(0xb0d941a0, 0x85e7, 0x4d8b, 0x9f, 0xd3, 0x5c, 0xed, 0x99, 0x34, 0x48, 0x2a)]
699 interface IDWriteTextAnalysisSink1(IDWriteTextAnalysisSink1Vtbl):
700     IDWriteTextAnalysisSink(IDWriteTextAnalysisSinkVtbl) {
701     fn SetGlyphOrientation(
702         textPosition: UINT32,
703         textLength: UINT32,
704         glyphOrientationAngle: DWRITE_GLYPH_ORIENTATION_ANGLE,
705         adjustedBidiLevel: UINT8,
706         isSideways: BOOL,
707         isRightToLeft: BOOL,
708     ) -> HRESULT,
709 }}
710 RIDL!{#[uuid(0x9064d822, 0x80a7, 0x465c, 0xa9, 0x86, 0xdf, 0x65, 0xf7, 0x8b, 0x8f, 0xeb)]
711 interface IDWriteTextLayout1(IDWriteTextLayout1Vtbl):
712     IDWriteTextLayout(IDWriteTextLayoutVtbl) {
713     fn SetPairKerning(
714         isPairKerningEnabled: BOOL,
715         textRange: DWRITE_TEXT_RANGE,
716     ) -> HRESULT,
717     fn GetPairKerning(
718         currentPosition: UINT32,
719         isPairKerningEnabled: *mut BOOL,
720         textRange: *mut DWRITE_TEXT_RANGE,
721     ) -> HRESULT,
722     fn SetCharacterSpacing(
723         leadingSpacing: FLOAT,
724         trailingSpacing: FLOAT,
725         minimumAdvanceWidth: FLOAT,
726         textRange: DWRITE_TEXT_RANGE,
727     ) -> HRESULT,
728     fn GetCharacterSpacing(
729         currentPosition: UINT32,
730         leadingSpacing: *mut FLOAT,
731         trailingSpacing: *mut FLOAT,
732         minimumAdvanceWidth: *mut FLOAT,
733         textRange: *mut DWRITE_TEXT_RANGE,
734     ) -> HRESULT,
735 }}
736 ENUM!{enum DWRITE_TEXT_ANTIALIAS_MODE {
737     DWRITE_TEXT_ANTIALIAS_MODE_CLEARTYPE = 0x0, // 0
738     DWRITE_TEXT_ANTIALIAS_MODE_GRAYSCALE = 0x1, // 1
739 }}
740 RIDL!{#[uuid(0x791e8298, 0x3ef3, 0x4230, 0x98, 0x80, 0xc9, 0xbd, 0xec, 0xc4, 0x20, 0x64)]
741 interface IDWriteBitmapRenderTarget1(IDWriteBitmapRenderTarget1Vtbl):
742     IDWriteBitmapRenderTarget(IDWriteBitmapRenderTargetVtbl) {
743     fn GetTextAntialiasMode() -> DWRITE_TEXT_ANTIALIAS_MODE,
744     fn SetTextAntialiasMode(
745         antialiasMode: DWRITE_TEXT_ANTIALIAS_MODE,
746     ) -> HRESULT,
747 }}
748