d3d8/tests: Use the available ARRAY_SIZE() macro.
[wine.git] / include / dwrite.idl
blobe6ab2b7ead483ab289cc900a42f50584022b956e
1 /*
2 * Copyright 2012 Nikolay Sivov for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 import "unknwn.idl";
20 import "dcommon.idl";
22 interface IDWriteFactory;
23 interface IDWriteFontCollection;
24 interface IDWriteFontFamily;
25 interface IDWriteFontFace;
26 interface IDWriteInlineObject;
28 interface ID2D1SimplifiedGeometrySink;
29 typedef ID2D1SimplifiedGeometrySink IDWriteGeometrySink;
31 cpp_quote("#ifndef _WINDEF_")
32 /* already defined in windef.h but needed for WIDL */
33 typedef void *HMONITOR;
34 cpp_quote("#endif /* _WINDEF_ */")
36 cpp_quote("#ifdef WINE_NO_UNICODE_MACROS")
37 cpp_quote("#undef GetGlyphIndices")
38 cpp_quote("#endif")
40 typedef enum DWRITE_FACTORY_TYPE
42 DWRITE_FACTORY_TYPE_SHARED,
43 DWRITE_FACTORY_TYPE_ISOLATED
44 } DWRITE_FACTORY_TYPE;
46 typedef enum DWRITE_FONT_FILE_TYPE
48 DWRITE_FONT_FILE_TYPE_UNKNOWN,
49 DWRITE_FONT_FILE_TYPE_CFF,
50 DWRITE_FONT_FILE_TYPE_TRUETYPE,
51 DWRITE_FONT_FILE_TYPE_OPENTYPE_COLLECTION,
52 DWRITE_FONT_FILE_TYPE_TYPE1_PFM,
53 DWRITE_FONT_FILE_TYPE_TYPE1_PFB,
54 DWRITE_FONT_FILE_TYPE_VECTOR,
55 DWRITE_FONT_FILE_TYPE_BITMAP,
56 DWRITE_FONT_FILE_TYPE_TRUETYPE_COLLECTION = DWRITE_FONT_FILE_TYPE_OPENTYPE_COLLECTION
57 } DWRITE_FONT_FILE_TYPE;
59 typedef enum DWRITE_FONT_FACE_TYPE
61 DWRITE_FONT_FACE_TYPE_CFF,
62 DWRITE_FONT_FACE_TYPE_TRUETYPE,
63 DWRITE_FONT_FACE_TYPE_OPENTYPE_COLLECTION,
64 DWRITE_FONT_FACE_TYPE_TYPE1,
65 DWRITE_FONT_FACE_TYPE_VECTOR,
66 DWRITE_FONT_FACE_TYPE_BITMAP,
67 DWRITE_FONT_FACE_TYPE_UNKNOWN,
68 DWRITE_FONT_FACE_TYPE_RAW_CFF,
69 DWRITE_FONT_FACE_TYPE_TRUETYPE_COLLECTION = DWRITE_FONT_FACE_TYPE_OPENTYPE_COLLECTION
70 } DWRITE_FONT_FACE_TYPE;
72 typedef enum DWRITE_FONT_WEIGHT
74 DWRITE_FONT_WEIGHT_THIN = 100,
75 DWRITE_FONT_WEIGHT_EXTRA_LIGHT = 200,
76 DWRITE_FONT_WEIGHT_ULTRA_LIGHT = 200,
77 DWRITE_FONT_WEIGHT_LIGHT = 300,
78 DWRITE_FONT_WEIGHT_SEMI_LIGHT = 350,
79 DWRITE_FONT_WEIGHT_NORMAL = 400,
80 DWRITE_FONT_WEIGHT_REGULAR = 400,
81 DWRITE_FONT_WEIGHT_MEDIUM = 500,
82 DWRITE_FONT_WEIGHT_DEMI_BOLD = 600,
83 DWRITE_FONT_WEIGHT_SEMI_BOLD = 600,
84 DWRITE_FONT_WEIGHT_BOLD = 700,
85 DWRITE_FONT_WEIGHT_EXTRA_BOLD = 800,
86 DWRITE_FONT_WEIGHT_ULTRA_BOLD = 800,
87 DWRITE_FONT_WEIGHT_BLACK = 900,
88 DWRITE_FONT_WEIGHT_HEAVY = 900,
89 DWRITE_FONT_WEIGHT_EXTRA_BLACK = 950,
90 DWRITE_FONT_WEIGHT_ULTRA_BLACK = 950
91 } DWRITE_FONT_WEIGHT;
93 typedef enum DWRITE_FONT_STRETCH
95 DWRITE_FONT_STRETCH_UNDEFINED = 0,
96 DWRITE_FONT_STRETCH_ULTRA_CONDENSED = 1,
97 DWRITE_FONT_STRETCH_EXTRA_CONDENSED = 2,
98 DWRITE_FONT_STRETCH_CONDENSED = 3,
99 DWRITE_FONT_STRETCH_SEMI_CONDENSED = 4,
100 DWRITE_FONT_STRETCH_NORMAL = 5,
101 DWRITE_FONT_STRETCH_MEDIUM = 5,
102 DWRITE_FONT_STRETCH_SEMI_EXPANDED = 6,
103 DWRITE_FONT_STRETCH_EXPANDED = 7,
104 DWRITE_FONT_STRETCH_EXTRA_EXPANDED = 8,
105 DWRITE_FONT_STRETCH_ULTRA_EXPANDED = 9
106 } DWRITE_FONT_STRETCH;
108 typedef enum DWRITE_FONT_STYLE
110 DWRITE_FONT_STYLE_NORMAL,
111 DWRITE_FONT_STYLE_OBLIQUE,
112 DWRITE_FONT_STYLE_ITALIC
113 } DWRITE_FONT_STYLE;
115 typedef enum DWRITE_INFORMATIONAL_STRING_ID
117 DWRITE_INFORMATIONAL_STRING_NONE,
118 DWRITE_INFORMATIONAL_STRING_COPYRIGHT_NOTICE,
119 DWRITE_INFORMATIONAL_STRING_VERSION_STRINGS,
120 DWRITE_INFORMATIONAL_STRING_TRADEMARK,
121 DWRITE_INFORMATIONAL_STRING_MANUFACTURER,
122 DWRITE_INFORMATIONAL_STRING_DESIGNER,
123 DWRITE_INFORMATIONAL_STRING_DESIGNER_URL,
124 DWRITE_INFORMATIONAL_STRING_DESCRIPTION,
125 DWRITE_INFORMATIONAL_STRING_FONT_VENDOR_URL,
126 DWRITE_INFORMATIONAL_STRING_LICENSE_DESCRIPTION,
127 DWRITE_INFORMATIONAL_STRING_LICENSE_INFO_URL,
128 DWRITE_INFORMATIONAL_STRING_WIN32_FAMILY_NAMES,
129 DWRITE_INFORMATIONAL_STRING_WIN32_SUBFAMILY_NAMES,
130 DWRITE_INFORMATIONAL_STRING_PREFERRED_FAMILY_NAMES,
131 DWRITE_INFORMATIONAL_STRING_PREFERRED_SUBFAMILY_NAMES,
132 DWRITE_INFORMATIONAL_STRING_SAMPLE_TEXT,
133 DWRITE_INFORMATIONAL_STRING_FULL_NAME,
134 DWRITE_INFORMATIONAL_STRING_POSTSCRIPT_NAME,
135 DWRITE_INFORMATIONAL_STRING_POSTSCRIPT_CID_NAME
136 } DWRITE_INFORMATIONAL_STRING_ID;
138 typedef enum DWRITE_FONT_SIMULATIONS
140 DWRITE_FONT_SIMULATIONS_NONE,
141 DWRITE_FONT_SIMULATIONS_BOLD,
142 DWRITE_FONT_SIMULATIONS_OBLIQUE
143 } DWRITE_FONT_SIMULATIONS;
145 typedef enum DWRITE_PIXEL_GEOMETRY
147 DWRITE_PIXEL_GEOMETRY_FLAT,
148 DWRITE_PIXEL_GEOMETRY_RGB,
149 DWRITE_PIXEL_GEOMETRY_BGR
150 } DWRITE_PIXEL_GEOMETRY;
152 typedef enum DWRITE_RENDERING_MODE
154 DWRITE_RENDERING_MODE_DEFAULT,
155 DWRITE_RENDERING_MODE_ALIASED,
156 DWRITE_RENDERING_MODE_GDI_CLASSIC,
157 DWRITE_RENDERING_MODE_GDI_NATURAL,
158 DWRITE_RENDERING_MODE_NATURAL,
159 DWRITE_RENDERING_MODE_NATURAL_SYMMETRIC,
160 DWRITE_RENDERING_MODE_OUTLINE,
161 DWRITE_RENDERING_MODE_CLEARTYPE_GDI_CLASSIC = DWRITE_RENDERING_MODE_GDI_CLASSIC,
162 DWRITE_RENDERING_MODE_CLEARTYPE_GDI_NATURAL = DWRITE_RENDERING_MODE_GDI_NATURAL,
163 DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL = DWRITE_RENDERING_MODE_NATURAL,
164 DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL_SYMMETRIC = DWRITE_RENDERING_MODE_NATURAL_SYMMETRIC
165 } DWRITE_RENDERING_MODE;
167 typedef enum DWRITE_TEXT_ALIGNMENT
169 DWRITE_TEXT_ALIGNMENT_LEADING,
170 DWRITE_TEXT_ALIGNMENT_TRAILING,
171 DWRITE_TEXT_ALIGNMENT_CENTER,
172 DWRITE_TEXT_ALIGNMENT_JUSTIFIED
173 } DWRITE_TEXT_ALIGNMENT;
175 typedef enum DWRITE_PARAGRAPH_ALIGNMENT
177 DWRITE_PARAGRAPH_ALIGNMENT_NEAR,
178 DWRITE_PARAGRAPH_ALIGNMENT_FAR,
179 DWRITE_PARAGRAPH_ALIGNMENT_CENTER
180 } DWRITE_PARAGRAPH_ALIGNMENT;
182 typedef enum DWRITE_WORD_WRAPPING
184 DWRITE_WORD_WRAPPING_WRAP,
185 DWRITE_WORD_WRAPPING_NO_WRAP,
186 DWRITE_WORD_WRAPPING_EMERGENCY_BREAK,
187 DWRITE_WORD_WRAPPING_WHOLE_WORD,
188 DWRITE_WORD_WRAPPING_CHARACTER
189 } DWRITE_WORD_WRAPPING;
191 typedef enum DWRITE_READING_DIRECTION
193 DWRITE_READING_DIRECTION_LEFT_TO_RIGHT,
194 DWRITE_READING_DIRECTION_RIGHT_TO_LEFT,
195 DWRITE_READING_DIRECTION_TOP_TO_BOTTOM,
196 DWRITE_READING_DIRECTION_BOTTOM_TO_TOP
197 } DWRITE_READING_DIRECTION;
199 typedef enum DWRITE_FLOW_DIRECTION
201 DWRITE_FLOW_DIRECTION_TOP_TO_BOTTOM,
202 DWRITE_FLOW_DIRECTION_BOTTOM_TO_TOP,
203 DWRITE_FLOW_DIRECTION_LEFT_TO_RIGHT,
204 DWRITE_FLOW_DIRECTION_RIGHT_TO_LEFT
205 } DWRITE_FLOW_DIRECTION;
207 typedef enum DWRITE_TRIMMING_GRANULARITY
209 DWRITE_TRIMMING_GRANULARITY_NONE,
210 DWRITE_TRIMMING_GRANULARITY_CHARACTER,
211 DWRITE_TRIMMING_GRANULARITY_WORD
212 } DWRITE_TRIMMING_GRANULARITY;
214 typedef enum DWRITE_BREAK_CONDITION
216 DWRITE_BREAK_CONDITION_NEUTRAL,
217 DWRITE_BREAK_CONDITION_CAN_BREAK,
218 DWRITE_BREAK_CONDITION_MAY_NOT_BREAK,
219 DWRITE_BREAK_CONDITION_MUST_BREAK
220 } DWRITE_BREAK_CONDITION;
222 typedef enum DWRITE_LINE_SPACING_METHOD
224 DWRITE_LINE_SPACING_METHOD_DEFAULT,
225 DWRITE_LINE_SPACING_METHOD_UNIFORM,
226 DWRITE_LINE_SPACING_METHOD_PROPORTIONAL
227 } DWRITE_LINE_SPACING_METHOD;
229 cpp_quote("#define DWRITE_MAKE_OPENTYPE_TAG(a,b,c,d) ( \\")
230 cpp_quote(" ((UINT32)(UINT8)(d) << 24) | \\")
231 cpp_quote(" ((UINT32)(UINT8)(c) << 16) | \\")
232 cpp_quote(" ((UINT32)(UINT8)(b) << 8) | \\")
233 cpp_quote(" (UINT32)(UINT8)(a))")
235 typedef enum DWRITE_FONT_FEATURE_TAG
237 DWRITE_FONT_FEATURE_TAG_ALTERNATIVE_FRACTIONS = 0x63726661, /* 'afrc' */
238 DWRITE_FONT_FEATURE_TAG_PETITE_CAPITALS_FROM_CAPITALS = 0x63703263, /* 'c2pc' */
239 DWRITE_FONT_FEATURE_TAG_SMALL_CAPITALS_FROM_CAPITALS = 0x63733263, /* 'c2sc' */
240 DWRITE_FONT_FEATURE_TAG_CONTEXTUAL_ALTERNATES = 0x746c6163, /* 'calt' */
241 DWRITE_FONT_FEATURE_TAG_CASE_SENSITIVE_FORMS = 0x65736163, /* 'case' */
242 DWRITE_FONT_FEATURE_TAG_GLYPH_COMPOSITION_DECOMPOSITION = 0x706d6363, /* 'ccmp' */
243 DWRITE_FONT_FEATURE_TAG_CONTEXTUAL_LIGATURES = 0x67696c63, /* 'clig' */
244 DWRITE_FONT_FEATURE_TAG_CAPITAL_SPACING = 0x70737063, /* 'cpsp' */
245 DWRITE_FONT_FEATURE_TAG_CONTEXTUAL_SWASH = 0x68777363, /* 'cswh' */
246 DWRITE_FONT_FEATURE_TAG_CURSIVE_POSITIONING = 0x73727563, /* 'curs' */
247 DWRITE_FONT_FEATURE_TAG_DEFAULT = 0x746c6664, /* 'dflt' */
248 DWRITE_FONT_FEATURE_TAG_DISCRETIONARY_LIGATURES = 0x67696c64, /* 'dlig' */
249 DWRITE_FONT_FEATURE_TAG_EXPERT_FORMS = 0x74707865, /* 'expt' */
250 DWRITE_FONT_FEATURE_TAG_FRACTIONS = 0x63617266, /* 'frac' */
251 DWRITE_FONT_FEATURE_TAG_FULL_WIDTH = 0x64697766, /* 'fwid' */
252 DWRITE_FONT_FEATURE_TAG_HALF_FORMS = 0x666c6168, /* 'half' */
253 DWRITE_FONT_FEATURE_TAG_HALANT_FORMS = 0x6e6c6168, /* 'haln' */
254 DWRITE_FONT_FEATURE_TAG_ALTERNATE_HALF_WIDTH = 0x746c6168, /* 'halt' */
255 DWRITE_FONT_FEATURE_TAG_HISTORICAL_FORMS = 0x74736968, /* 'hist' */
256 DWRITE_FONT_FEATURE_TAG_HORIZONTAL_KANA_ALTERNATES = 0x616e6b68, /* 'hkna' */
257 DWRITE_FONT_FEATURE_TAG_HISTORICAL_LIGATURES = 0x67696c68, /* 'hlig' */
258 DWRITE_FONT_FEATURE_TAG_HALF_WIDTH = 0x64697768, /* 'hwid' */
259 DWRITE_FONT_FEATURE_TAG_HOJO_KANJI_FORMS = 0x6f6a6f68, /* 'hojo' */
260 DWRITE_FONT_FEATURE_TAG_JIS04_FORMS = 0x3430706a, /* 'jp04' */
261 DWRITE_FONT_FEATURE_TAG_JIS78_FORMS = 0x3837706a, /* 'jp78' */
262 DWRITE_FONT_FEATURE_TAG_JIS83_FORMS = 0x3338706a, /* 'jp83' */
263 DWRITE_FONT_FEATURE_TAG_JIS90_FORMS = 0x3039706a, /* 'jp90' */
264 DWRITE_FONT_FEATURE_TAG_KERNING = 0x6e72656b, /* 'kern' */
265 DWRITE_FONT_FEATURE_TAG_STANDARD_LIGATURES = 0x6167696c, /* 'liga' */
266 DWRITE_FONT_FEATURE_TAG_LINING_FIGURES = 0x6d756e6c, /* 'lnum' */
267 DWRITE_FONT_FEATURE_TAG_LOCALIZED_FORMS = 0x6c636f6c, /* 'locl' */
268 DWRITE_FONT_FEATURE_TAG_MARK_POSITIONING = 0x6b72616d, /* 'mark' */
269 DWRITE_FONT_FEATURE_TAG_MATHEMATICAL_GREEK = 0x6b72676d, /* 'mgrk' */
270 DWRITE_FONT_FEATURE_TAG_MARK_TO_MARK_POSITIONING = 0x6b6d6b6d, /* 'mkmk' */
271 DWRITE_FONT_FEATURE_TAG_ALTERNATE_ANNOTATION_FORMS = 0x746c616e, /* 'nalt' */
272 DWRITE_FONT_FEATURE_TAG_NLC_KANJI_FORMS = 0x6b636c6e, /* 'nlck' */
273 DWRITE_FONT_FEATURE_TAG_OLD_STYLE_FIGURES = 0x6d756e6f, /* 'onum' */
274 DWRITE_FONT_FEATURE_TAG_ORDINALS = 0x6e64726f, /* 'ordn' */
275 DWRITE_FONT_FEATURE_TAG_PROPORTIONAL_ALTERNATE_WIDTH = 0x746c6170, /* 'palt' */
276 DWRITE_FONT_FEATURE_TAG_PETITE_CAPITALS = 0x70616370, /* 'pcap' */
277 DWRITE_FONT_FEATURE_TAG_PROPORTIONAL_FIGURES = 0x6d756e70, /* 'pnum' */
278 DWRITE_FONT_FEATURE_TAG_PROPORTIONAL_WIDTHS = 0x64697770, /* 'pwid' */
279 DWRITE_FONT_FEATURE_TAG_QUARTER_WIDTHS = 0x64697771, /* 'qwid' */
280 DWRITE_FONT_FEATURE_TAG_REQUIRED_LIGATURES = 0x67696c72, /* 'rlig' */
281 DWRITE_FONT_FEATURE_TAG_RUBY_NOTATION_FORMS = 0x79627572, /* 'ruby' */
282 DWRITE_FONT_FEATURE_TAG_STYLISTIC_ALTERNATES = 0x746c6173, /* 'salt' */
283 DWRITE_FONT_FEATURE_TAG_SCIENTIFIC_INFERIORS = 0x666e6973, /* 'sinf' */
284 DWRITE_FONT_FEATURE_TAG_SMALL_CAPITALS = 0x70636d73, /* 'smcp' */
285 DWRITE_FONT_FEATURE_TAG_SIMPLIFIED_FORMS = 0x6c706d73, /* 'smpl' */
286 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_1 = 0x31307373, /* 'ss01' */
287 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_2 = 0x32307373, /* 'ss02' */
288 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_3 = 0x33307373, /* 'ss03' */
289 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_4 = 0x34307373, /* 'ss04' */
290 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_5 = 0x35307373, /* 'ss05' */
291 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_6 = 0x36307373, /* 'ss06' */
292 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_7 = 0x37307373, /* 'ss07' */
293 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_8 = 0x38307373, /* 'ss08' */
294 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_9 = 0x39307373, /* 'ss09' */
295 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_10 = 0x30317373, /* 'ss10' */
296 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_11 = 0x31317373, /* 'ss11' */
297 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_12 = 0x32317373, /* 'ss12' */
298 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_13 = 0x33317373, /* 'ss13' */
299 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_14 = 0x34317373, /* 'ss14' */
300 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_15 = 0x35317373, /* 'ss15' */
301 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_16 = 0x36317373, /* 'ss16' */
302 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_17 = 0x37317373, /* 'ss17' */
303 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_18 = 0x38317373, /* 'ss18' */
304 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_19 = 0x39317373, /* 'ss19' */
305 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_20 = 0x30327373, /* 'ss20' */
306 DWRITE_FONT_FEATURE_TAG_SUBSCRIPT = 0x73627573, /* 'subs' */
307 DWRITE_FONT_FEATURE_TAG_SUPERSCRIPT = 0x73707573, /* 'sups' */
308 DWRITE_FONT_FEATURE_TAG_SWASH = 0x68737773, /* 'swsh' */
309 DWRITE_FONT_FEATURE_TAG_TITLING = 0x6c746974, /* 'titl' */
310 DWRITE_FONT_FEATURE_TAG_TRADITIONAL_NAME_FORMS = 0x6d616e74, /* 'tnam' */
311 DWRITE_FONT_FEATURE_TAG_TABULAR_FIGURES = 0x6d756e74, /* 'tnum' */
312 DWRITE_FONT_FEATURE_TAG_TRADITIONAL_FORMS = 0x64617274, /* 'trad' */
313 DWRITE_FONT_FEATURE_TAG_THIRD_WIDTHS = 0x64697774, /* 'twid' */
314 DWRITE_FONT_FEATURE_TAG_UNICASE = 0x63696e75, /* 'unic' */
315 DWRITE_FONT_FEATURE_TAG_VERTICAL_WRITING = 0x74726576, /* 'vert' */
316 DWRITE_FONT_FEATURE_TAG_VERTICAL_ALTERNATES_AND_ROTATION= 0x32747276, /* 'vrt2' */
317 DWRITE_FONT_FEATURE_TAG_SLASHED_ZERO = 0x6f72657a, /* 'zero' */
318 } DWRITE_FONT_FEATURE_TAG;
320 typedef enum DWRITE_SCRIPT_SHAPES
322 DWRITE_SCRIPT_SHAPES_DEFAULT = 0,
323 DWRITE_SCRIPT_SHAPES_NO_VISUAL = 1
324 } DWRITE_SCRIPT_SHAPES;
326 typedef enum DWRITE_NUMBER_SUBSTITUTION_METHOD
328 DWRITE_NUMBER_SUBSTITUTION_METHOD_FROM_CULTURE,
329 DWRITE_NUMBER_SUBSTITUTION_METHOD_CONTEXTUAL,
330 DWRITE_NUMBER_SUBSTITUTION_METHOD_NONE,
331 DWRITE_NUMBER_SUBSTITUTION_METHOD_NATIONAL,
332 DWRITE_NUMBER_SUBSTITUTION_METHOD_TRADITIONAL
333 } DWRITE_NUMBER_SUBSTITUTION_METHOD;
335 cpp_quote("#define DWRITE_ALPHA_MAX 255")
337 typedef enum DWRITE_TEXTURE_TYPE
339 DWRITE_TEXTURE_ALIASED_1x1,
340 DWRITE_TEXTURE_CLEARTYPE_3x1
341 } DWRITE_TEXTURE_TYPE;
343 typedef struct DWRITE_FONT_METRICS
345 UINT16 designUnitsPerEm;
346 UINT16 ascent;
347 UINT16 descent;
348 INT16 lineGap;
349 UINT16 capHeight;
350 UINT16 xHeight;
351 INT16 underlinePosition;
352 UINT16 underlineThickness;
353 INT16 strikethroughPosition;
354 UINT16 strikethroughThickness;
355 } DWRITE_FONT_METRICS;
357 typedef struct DWRITE_GLYPH_METRICS
359 INT32 leftSideBearing;
360 UINT32 advanceWidth;
361 INT32 rightSideBearing;
362 INT32 topSideBearing;
363 UINT32 advanceHeight;
364 INT32 bottomSideBearing;
365 INT32 verticalOriginY;
366 } DWRITE_GLYPH_METRICS;
368 typedef struct DWRITE_GLYPH_OFFSET
370 FLOAT advanceOffset;
371 FLOAT ascenderOffset;
372 } DWRITE_GLYPH_OFFSET;
374 typedef struct DWRITE_MATRIX
376 FLOAT m11;
377 FLOAT m12;
378 FLOAT m21;
379 FLOAT m22;
380 FLOAT dx;
381 FLOAT dy;
382 } DWRITE_MATRIX;
384 typedef struct DWRITE_TRIMMING
386 DWRITE_TRIMMING_GRANULARITY granularity;
387 UINT32 delimiter;
388 UINT32 delimiterCount;
389 } DWRITE_TRIMMING;
391 cpp_quote("#ifndef __d2d1_h__")
392 typedef struct DWRITE_GLYPH_RUN DWRITE_GLYPH_RUN;
393 cpp_quote("#endif /* __d2d1_h__ */")
395 struct DWRITE_GLYPH_RUN
397 IDWriteFontFace* fontFace;
398 FLOAT fontEmSize;
399 UINT32 glyphCount;
400 UINT16 const* glyphIndices;
401 FLOAT const* glyphAdvances;
402 DWRITE_GLYPH_OFFSET const* glyphOffsets;
403 BOOL isSideways;
404 UINT32 bidiLevel;
407 typedef struct DWRITE_GLYPH_RUN_DESCRIPTION
409 WCHAR const* localeName;
410 WCHAR const* string;
411 UINT32 stringLength;
412 UINT16 const* clusterMap;
413 UINT32 textPosition;
414 } DWRITE_GLYPH_RUN_DESCRIPTION;
416 typedef struct DWRITE_UNDERLINE
418 FLOAT width;
419 FLOAT thickness;
420 FLOAT offset;
421 FLOAT runHeight;
422 DWRITE_READING_DIRECTION readingDirection;
423 DWRITE_FLOW_DIRECTION flowDirection;
424 WCHAR const* localeName;
425 DWRITE_MEASURING_MODE measuringMode;
426 } DWRITE_UNDERLINE;
428 typedef struct DWRITE_STRIKETHROUGH
430 FLOAT width;
431 FLOAT thickness;
432 FLOAT offset;
433 DWRITE_READING_DIRECTION readingDirection;
434 DWRITE_FLOW_DIRECTION flowDirection;
435 WCHAR const* localeName;
436 DWRITE_MEASURING_MODE measuringMode;
437 } DWRITE_STRIKETHROUGH;
439 typedef struct DWRITE_INLINE_OBJECT_METRICS
441 FLOAT width;
442 FLOAT height;
443 FLOAT baseline;
444 BOOL supportsSideways;
445 } DWRITE_INLINE_OBJECT_METRICS;
447 typedef struct DWRITE_OVERHANG_METRICS
449 FLOAT left;
450 FLOAT top;
451 FLOAT right;
452 FLOAT bottom;
453 } DWRITE_OVERHANG_METRICS;
455 typedef struct DWRITE_FONT_FEATURE
457 DWRITE_FONT_FEATURE_TAG nameTag;
458 UINT32 parameter;
459 } DWRITE_FONT_FEATURE;
461 typedef struct DWRITE_TEXT_RANGE
463 UINT32 startPosition;
464 UINT32 length;
465 } DWRITE_TEXT_RANGE;
467 typedef struct DWRITE_LINE_METRICS
469 UINT32 length;
470 UINT32 trailingWhitespaceLength;
471 UINT32 newlineLength;
472 FLOAT height;
473 FLOAT baseline;
474 BOOL isTrimmed;
475 } DWRITE_LINE_METRICS;
477 typedef struct DWRITE_TEXT_METRICS
479 FLOAT left;
480 FLOAT top;
481 FLOAT width;
482 FLOAT widthIncludingTrailingWhitespace;
483 FLOAT height;
484 FLOAT layoutWidth;
485 FLOAT layoutHeight;
486 UINT32 maxBidiReorderingDepth;
487 UINT32 lineCount;
488 } DWRITE_TEXT_METRICS;
490 typedef struct DWRITE_CLUSTER_METRICS
492 FLOAT width;
493 UINT16 length;
494 UINT16 canWrapLineAfter : 1;
495 UINT16 isWhitespace : 1;
496 UINT16 isNewline : 1;
497 UINT16 isSoftHyphen : 1;
498 UINT16 isRightToLeft : 1;
499 UINT16 padding : 11;
500 } DWRITE_CLUSTER_METRICS;
502 typedef struct DWRITE_HIT_TEST_METRICS
504 UINT32 textPosition;
505 UINT32 length;
506 FLOAT left;
507 FLOAT top;
508 FLOAT width;
509 FLOAT height;
510 UINT32 bidiLevel;
511 BOOL isText;
512 BOOL isTrimmed;
513 } DWRITE_HIT_TEST_METRICS;
515 typedef struct DWRITE_SCRIPT_ANALYSIS
517 UINT16 script;
518 DWRITE_SCRIPT_SHAPES shapes;
519 } DWRITE_SCRIPT_ANALYSIS;
521 typedef struct DWRITE_LINE_BREAKPOINT
523 UINT8 breakConditionBefore : 2;
524 UINT8 breakConditionAfter : 2;
525 UINT8 isWhitespace : 1;
526 UINT8 isSoftHyphen : 1;
527 UINT8 padding : 2;
528 } DWRITE_LINE_BREAKPOINT;
530 typedef struct DWRITE_TYPOGRAPHIC_FEATURES
532 DWRITE_FONT_FEATURE* features;
533 UINT32 featureCount;
534 } DWRITE_TYPOGRAPHIC_FEATURES;
536 typedef struct DWRITE_SHAPING_TEXT_PROPERTIES
538 UINT16 isShapedAlone : 1;
539 UINT16 reserved : 15;
540 } DWRITE_SHAPING_TEXT_PROPERTIES;
542 typedef struct DWRITE_SHAPING_GLYPH_PROPERTIES
544 UINT16 justification : 4;
545 UINT16 isClusterStart : 1;
546 UINT16 isDiacritic : 1;
547 UINT16 isZeroWidthSpace : 1;
548 UINT16 reserved : 9;
549 } DWRITE_SHAPING_GLYPH_PROPERTIES;
552 local,
553 object,
554 uuid(6d4865fe-0ab8-4d91-8f62-5dd6be34a3e0)
556 interface IDWriteFontFileStream : IUnknown
558 HRESULT ReadFileFragment(
559 void const **fragment_start,
560 UINT64 offset,
561 UINT64 fragment_size,
562 void **fragment_context);
564 void ReleaseFileFragment(void *fragment_context);
565 HRESULT GetFileSize(UINT64 *size);
566 HRESULT GetLastWriteTime(UINT64 *last_writetime);
570 local,
571 object,
572 uuid(727cad4e-d6af-4c9e-8a08-d695b11caa49)
574 interface IDWriteFontFileLoader : IUnknown
576 HRESULT CreateStreamFromKey(
577 void const *key,
578 UINT32 key_size,
579 IDWriteFontFileStream **stream);
583 local,
584 object,
585 uuid(b2d9f3ec-c9fe-4a11-a2ec-d86208f7c0a2)
587 interface IDWriteLocalFontFileLoader : IDWriteFontFileLoader
589 HRESULT GetFilePathLengthFromKey(void const *key, UINT32 key_size, UINT32 *length);
590 HRESULT GetFilePathFromKey(void const *key, UINT32 key_size, WCHAR *path, UINT32 length);
591 HRESULT GetLastWriteTimeFromKey(void const *key, UINT32 key_size, FILETIME *writetime);
595 local,
596 object,
597 uuid(739d886a-cef5-47dc-8769-1a8b41bebbb0)
599 interface IDWriteFontFile : IUnknown
601 HRESULT GetReferenceKey(
602 void const **key,
603 UINT32 *key_size);
605 HRESULT GetLoader(IDWriteFontFileLoader **loader);
607 HRESULT Analyze(
608 BOOL *is_supported_fonttype,
609 DWRITE_FONT_FILE_TYPE *file_type,
610 DWRITE_FONT_FACE_TYPE *face_type,
611 UINT32 *faces_num);
615 local,
616 object,
617 uuid(72755049-5ff7-435d-8348-4be97cfa6c7c)
619 interface IDWriteFontFileEnumerator : IUnknown
621 HRESULT MoveNext(BOOL *has_current_file);
622 HRESULT GetCurrentFontFile(IDWriteFontFile **font_file);
626 local,
627 object,
628 uuid(cca920e4-52f0-492b-bfa8-29c72ee0a468)
630 interface IDWriteFontCollectionLoader : IUnknown
632 HRESULT CreateEnumeratorFromKey(
633 IDWriteFactory* factory,
634 void const* key,
635 UINT32 key_size,
636 IDWriteFontFileEnumerator **enumerator);
640 local,
641 object,
642 uuid(08256209-099a-4b34-b86d-c22b110e7771)
644 interface IDWriteLocalizedStrings : IUnknown
646 UINT32 GetCount();
648 HRESULT FindLocaleName(
649 WCHAR const *locale_name,
650 UINT32 *index,
651 BOOL *exists);
653 HRESULT GetLocaleNameLength(UINT32 index, UINT32 *length);
654 HRESULT GetLocaleName(UINT32 index, WCHAR *locale_name, UINT32 size);
655 HRESULT GetStringLength(UINT32 index, UINT32 *length);
656 HRESULT GetString(UINT32 index, WCHAR *buffer, UINT32 size);
660 local,
661 object,
662 uuid(2f0da53a-2add-47cd-82ee-d9ec34688e75)
664 interface IDWriteRenderingParams : IUnknown
666 FLOAT GetGamma();
667 FLOAT GetEnhancedContrast();
668 FLOAT GetClearTypeLevel();
669 DWRITE_PIXEL_GEOMETRY GetPixelGeometry();
670 DWRITE_RENDERING_MODE GetRenderingMode();
674 local,
675 object,
676 uuid(5f49804d-7024-4d43-bfa9-d25984f53849)
678 interface IDWriteFontFace : IUnknown
680 DWRITE_FONT_FACE_TYPE GetType();
681 HRESULT GetFiles(UINT32 *number_of_files, IDWriteFontFile **fontfiles);
682 UINT32 GetIndex();
683 DWRITE_FONT_SIMULATIONS GetSimulations();
684 BOOL IsSymbolFont();
685 void GetMetrics(DWRITE_FONT_METRICS *metrics);
686 UINT16 GetGlyphCount();
688 HRESULT GetDesignGlyphMetrics(
689 UINT16 const *glyph_indices,
690 UINT32 glyph_count,
691 DWRITE_GLYPH_METRICS *metrics,
692 [defaultvalue(FALSE)] BOOL is_sideways);
694 HRESULT GetGlyphIndices(
695 UINT32 const *codepoints,
696 UINT32 count,
697 UINT16 *glyph_indices);
699 HRESULT TryGetFontTable(
700 UINT32 table_tag,
701 const void **table_data,
702 UINT32 *table_size,
703 void **context,
704 BOOL *exists);
706 void ReleaseFontTable(void *table_context);
708 HRESULT GetGlyphRunOutline(
709 FLOAT emSize,
710 UINT16 const *glyph_indices,
711 FLOAT const* glyph_advances,
712 DWRITE_GLYPH_OFFSET const *glyph_offsets,
713 UINT32 glyph_count,
714 BOOL is_sideways,
715 BOOL is_rtl,
716 IDWriteGeometrySink *geometrysink);
718 HRESULT GetRecommendedRenderingMode(
719 FLOAT emSize,
720 FLOAT pixels_per_dip,
721 DWRITE_MEASURING_MODE mode,
722 IDWriteRenderingParams* params,
723 DWRITE_RENDERING_MODE* rendering_mode);
725 HRESULT GetGdiCompatibleMetrics(
726 FLOAT emSize,
727 FLOAT pixels_per_dip,
728 DWRITE_MATRIX const *transform,
729 DWRITE_FONT_METRICS *metrics);
731 HRESULT GetGdiCompatibleGlyphMetrics(
732 FLOAT emSize,
733 FLOAT pixels_per_dip,
734 DWRITE_MATRIX const *transform,
735 BOOL use_gdi_natural,
736 UINT16 const *glyph_indices,
737 UINT32 glyph_count,
738 DWRITE_GLYPH_METRICS *metrics,
739 [defaultvalue(FALSE)] BOOL is_sideways);
743 local,
744 object,
745 uuid(acd16696-8c14-4f5d-877e-fe3fc1d32737)
747 interface IDWriteFont : IUnknown
749 HRESULT GetFontFamily(IDWriteFontFamily **family);
750 DWRITE_FONT_WEIGHT GetWeight();
751 DWRITE_FONT_STRETCH GetStretch();
752 DWRITE_FONT_STYLE GetStyle();
753 BOOL IsSymbolFont();
755 HRESULT GetFaceNames(IDWriteLocalizedStrings **names);
756 HRESULT GetInformationalStrings(
757 DWRITE_INFORMATIONAL_STRING_ID stringid,
758 IDWriteLocalizedStrings **strings,
759 BOOL *exists);
761 DWRITE_FONT_SIMULATIONS GetSimulations();
762 void GetMetrics(DWRITE_FONT_METRICS *metrics);
763 HRESULT HasCharacter(UINT32 value, BOOL *exists);
764 HRESULT CreateFontFace(IDWriteFontFace **face);
768 local,
769 object,
770 uuid(1a0d8438-1d97-4ec1-aef9-a2fb86ed6acb)
772 interface IDWriteFontList : IUnknown
774 HRESULT GetFontCollection(IDWriteFontCollection **collection);
775 UINT32 GetFontCount();
776 HRESULT GetFont(UINT32 index, IDWriteFont **font);
780 local,
781 object,
782 uuid(da20d8ef-812a-4c43-9802-62ec4abd7add)
784 interface IDWriteFontFamily : IDWriteFontList
786 HRESULT GetFamilyNames(IDWriteLocalizedStrings **names);
788 HRESULT GetFirstMatchingFont(
789 DWRITE_FONT_WEIGHT weight,
790 DWRITE_FONT_STRETCH stretch,
791 DWRITE_FONT_STYLE style,
792 IDWriteFont **font);
794 HRESULT GetMatchingFonts(
795 DWRITE_FONT_WEIGHT weight,
796 DWRITE_FONT_STRETCH stretch,
797 DWRITE_FONT_STYLE style,
798 IDWriteFontList **fonts);
802 local,
803 object,
804 uuid(a84cee02-3eea-4eee-a827-87c1a02a0fcc)
806 interface IDWriteFontCollection : IUnknown
808 UINT32 GetFontFamilyCount();
809 HRESULT GetFontFamily(UINT32 index, IDWriteFontFamily **family);
810 HRESULT FindFamilyName(WCHAR const *name, UINT32 *index, BOOL *exists);
811 HRESULT GetFontFromFontFace(IDWriteFontFace *face, IDWriteFont **font);
815 local,
816 object,
817 uuid(eaf3a2da-ecf4-4d24-b644-b34f6842024b)
819 interface IDWritePixelSnapping : IUnknown
821 HRESULT IsPixelSnappingDisabled(
822 void *client_drawingcontext,
823 BOOL *disabled);
825 HRESULT GetCurrentTransform(
826 void *client_drawingcontext,
827 DWRITE_MATRIX *transform);
829 HRESULT GetPixelsPerDip(
830 void *client_drawingcontext,
831 FLOAT *pixels_per_dip);
835 local,
836 object,
837 uuid(ef8a8135-5cc6-45fe-8825-c5a0724eb819)
839 interface IDWriteTextRenderer : IDWritePixelSnapping
841 HRESULT DrawGlyphRun(
842 void* client_drawingcontext,
843 FLOAT baselineOriginX,
844 FLOAT baselineOriginY,
845 DWRITE_MEASURING_MODE mode,
846 DWRITE_GLYPH_RUN const *glyph_run,
847 DWRITE_GLYPH_RUN_DESCRIPTION const *run_descr,
848 IUnknown *drawing_effect);
850 HRESULT DrawUnderline(
851 void *client_drawingcontext,
852 FLOAT baselineOriginX,
853 FLOAT baselineOriginY,
854 DWRITE_UNDERLINE const* underline,
855 IUnknown *drawing_effect);
857 HRESULT DrawStrikethrough(
858 void *client_drawingcontext,
859 FLOAT baselineOriginX,
860 FLOAT baselineOriginY,
861 DWRITE_STRIKETHROUGH const* strikethrough,
862 IUnknown *drawing_effect);
864 HRESULT DrawInlineObject(
865 void *client_drawingcontext,
866 FLOAT originX,
867 FLOAT originY,
868 IDWriteInlineObject *object,
869 BOOL is_sideways,
870 BOOL is_rtl,
871 IUnknown *drawing_effect);
875 local,
876 object,
877 uuid(8339fde3-106f-47ab-8373-1c6295eb10b3)
879 interface IDWriteInlineObject : IUnknown
881 HRESULT Draw(
882 void* client_drawingontext,
883 IDWriteTextRenderer* renderer,
884 FLOAT originX,
885 FLOAT originY,
886 BOOL is_sideways,
887 BOOL is_rtl,
888 IUnknown *drawing_effect);
890 HRESULT GetMetrics(DWRITE_INLINE_OBJECT_METRICS *metrics);
891 HRESULT GetOverhangMetrics(DWRITE_OVERHANG_METRICS *overhangs);
892 HRESULT GetBreakConditions(
893 DWRITE_BREAK_CONDITION* condition_before,
894 DWRITE_BREAK_CONDITION* condition_after);
898 local,
899 object,
900 uuid(9c906818-31d7-4fd3-a151-7c5e225db55a)
902 interface IDWriteTextFormat : IUnknown
904 HRESULT SetTextAlignment(DWRITE_TEXT_ALIGNMENT alignment);
905 HRESULT SetParagraphAlignment(DWRITE_PARAGRAPH_ALIGNMENT alignment);
906 HRESULT SetWordWrapping(DWRITE_WORD_WRAPPING wrapping);
907 HRESULT SetReadingDirection(DWRITE_READING_DIRECTION direction);
908 HRESULT SetFlowDirection(DWRITE_FLOW_DIRECTION direction);
909 HRESULT SetIncrementalTabStop(FLOAT tabstop);
910 HRESULT SetTrimming(DWRITE_TRIMMING const *trimming, IDWriteInlineObject *trimming_sign);
911 HRESULT SetLineSpacing(DWRITE_LINE_SPACING_METHOD spacing, FLOAT line_spacing, FLOAT baseline);
912 DWRITE_TEXT_ALIGNMENT GetTextAlignment();
913 DWRITE_PARAGRAPH_ALIGNMENT GetParagraphAlignment();
914 DWRITE_WORD_WRAPPING GetWordWrapping();
915 DWRITE_READING_DIRECTION GetReadingDirection();
916 DWRITE_FLOW_DIRECTION GetFlowDirection();
917 FLOAT GetIncrementalTabStop();
918 HRESULT GetTrimming(DWRITE_TRIMMING *options, IDWriteInlineObject **trimming_sign);
920 HRESULT GetLineSpacing(
921 DWRITE_LINE_SPACING_METHOD *method,
922 FLOAT *spacing,
923 FLOAT *baseline);
925 HRESULT GetFontCollection(IDWriteFontCollection **collection);
926 UINT32 GetFontFamilyNameLength();
927 HRESULT GetFontFamilyName(WCHAR *name, UINT32 size);
928 DWRITE_FONT_WEIGHT GetFontWeight();
929 DWRITE_FONT_STYLE GetFontStyle();
930 DWRITE_FONT_STRETCH GetFontStretch();
931 FLOAT GetFontSize();
932 UINT32 GetLocaleNameLength();
933 HRESULT GetLocaleName(WCHAR *name, UINT32 size);
937 local,
938 object,
939 uuid(55f1112b-1dc2-4b3c-9541-f46894ed85b6)
941 interface IDWriteTypography : IUnknown
943 HRESULT AddFontFeature(DWRITE_FONT_FEATURE feature);
944 UINT32 GetFontFeatureCount();
945 HRESULT GetFontFeature(UINT32 index, DWRITE_FONT_FEATURE *feature);
949 local,
950 object,
951 uuid(5e5a32a3-8dff-4773-9ff6-0696eab77267)
953 interface IDWriteBitmapRenderTarget : IUnknown
955 HRESULT DrawGlyphRun(
956 FLOAT baselineOriginX,
957 FLOAT baselineOriginY,
958 DWRITE_MEASURING_MODE measuring_mode,
959 DWRITE_GLYPH_RUN const* glyph_run,
960 IDWriteRenderingParams* params,
961 COLORREF textColor,
962 [defaultvalue(NULL)] RECT *blackbox_rect);
964 HDC GetMemoryDC();
965 FLOAT GetPixelsPerDip();
966 HRESULT SetPixelsPerDip(FLOAT pixels_per_dip);
967 HRESULT GetCurrentTransform(DWRITE_MATRIX *transform);
968 HRESULT SetCurrentTransform(DWRITE_MATRIX const *transform);
969 HRESULT GetSize(SIZE *size);
970 HRESULT Resize(UINT32 width, UINT32 height);
973 cpp_quote("#ifndef _WINGDI_")
974 /* already defined in wingdi.h but needed for WIDL */
975 #define LF_FACESIZE 32
977 typedef struct tagLOGFONTW
979 LONG lfHeight;
980 LONG lfWidth;
981 LONG lfEscapement;
982 LONG lfOrientation;
983 LONG lfWeight;
984 BYTE lfItalic;
985 BYTE lfUnderline;
986 BYTE lfStrikeOut;
987 BYTE lfCharSet;
988 BYTE lfOutPrecision;
989 BYTE lfClipPrecision;
990 BYTE lfQuality;
991 BYTE lfPitchAndFamily;
992 WCHAR lfFaceName[LF_FACESIZE];
993 } LOGFONTW, *PLOGFONTW, *LPLOGFONTW;
994 cpp_quote("#endif /* _WINGDI_ */")
997 local,
998 object,
999 uuid(1edd9491-9853-4299-898f-6432983b6f3a)
1001 interface IDWriteGdiInterop : IUnknown
1003 HRESULT CreateFontFromLOGFONT(LOGFONTW const *logfont, IDWriteFont **font);
1004 HRESULT ConvertFontToLOGFONT(
1005 IDWriteFont* font,
1006 LOGFONTW* logfont,
1007 BOOL *is_systemfont);
1009 HRESULT ConvertFontFaceToLOGFONT(IDWriteFontFace* font, LOGFONTW* logfont);
1010 HRESULT CreateFontFaceFromHdc(HDC hdc, IDWriteFontFace **fontface);
1011 HRESULT CreateBitmapRenderTarget(HDC hdc, UINT32 width, UINT32 height, IDWriteBitmapRenderTarget **target);
1015 local,
1016 object,
1017 uuid(53737037-6d14-410b-9bfe-0b182bb70961)
1019 interface IDWriteTextLayout : IDWriteTextFormat
1021 HRESULT SetMaxWidth(FLOAT maxWidth);
1022 HRESULT SetMaxHeight(FLOAT maxHeight);
1023 HRESULT SetFontCollection(IDWriteFontCollection* collection, DWRITE_TEXT_RANGE range);
1024 HRESULT SetFontFamilyName(WCHAR const *name, DWRITE_TEXT_RANGE range);
1025 HRESULT SetFontWeight(DWRITE_FONT_WEIGHT weight, DWRITE_TEXT_RANGE range);
1026 HRESULT SetFontStyle(DWRITE_FONT_STYLE style, DWRITE_TEXT_RANGE range);
1027 HRESULT SetFontStretch(DWRITE_FONT_STRETCH stretch, DWRITE_TEXT_RANGE range);
1028 HRESULT SetFontSize(FLOAT size, DWRITE_TEXT_RANGE range);
1029 HRESULT SetUnderline(BOOL underline, DWRITE_TEXT_RANGE range);
1030 HRESULT SetStrikethrough(BOOL strikethrough, DWRITE_TEXT_RANGE range);
1031 HRESULT SetDrawingEffect(IUnknown* effect, DWRITE_TEXT_RANGE range);
1032 HRESULT SetInlineObject(IDWriteInlineObject *object, DWRITE_TEXT_RANGE range);
1033 HRESULT SetTypography(IDWriteTypography* typography, DWRITE_TEXT_RANGE range);
1034 HRESULT SetLocaleName(WCHAR const* locale, DWRITE_TEXT_RANGE range);
1036 FLOAT GetMaxWidth();
1037 FLOAT GetMaxHeight();
1038 HRESULT GetFontCollection(
1039 UINT32 pos,
1040 IDWriteFontCollection** collection,
1041 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1043 HRESULT GetFontFamilyNameLength(
1044 UINT32 pos,
1045 UINT32* len,
1046 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1048 HRESULT GetFontFamilyName(
1049 UINT32 position,
1050 WCHAR* name,
1051 UINT32 name_size,
1052 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1054 HRESULT GetFontWeight(
1055 UINT32 position,
1056 DWRITE_FONT_WEIGHT *weight,
1057 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1059 HRESULT GetFontStyle(
1060 UINT32 currentPosition,
1061 DWRITE_FONT_STYLE *style,
1062 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1064 HRESULT GetFontStretch(
1065 UINT32 position,
1066 DWRITE_FONT_STRETCH *stretch,
1067 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1069 HRESULT GetFontSize(
1070 UINT32 position,
1071 FLOAT *size,
1072 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1074 HRESULT GetUnderline(
1075 UINT32 position,
1076 BOOL *has_underline,
1077 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1079 HRESULT GetStrikethrough(
1080 UINT32 position,
1081 BOOL *has_strikethrough,
1082 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1084 HRESULT GetDrawingEffect(
1085 UINT32 position,
1086 IUnknown **effect,
1087 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1089 HRESULT GetInlineObject(
1090 UINT32 position,
1091 IDWriteInlineObject **object,
1092 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1094 HRESULT GetTypography(
1095 UINT32 position,
1096 IDWriteTypography** typography,
1097 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1099 HRESULT GetLocaleNameLength(
1100 UINT32 position,
1101 UINT32* length,
1102 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1104 HRESULT GetLocaleName(
1105 UINT32 position,
1106 WCHAR* name,
1107 UINT32 name_size,
1108 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1110 HRESULT Draw(
1111 void *context,
1112 IDWriteTextRenderer* renderer,
1113 FLOAT originX,
1114 FLOAT originY);
1116 HRESULT GetLineMetrics(
1117 DWRITE_LINE_METRICS *metrics,
1118 UINT32 max_count,
1119 UINT32 *actual_count);
1121 HRESULT GetMetrics(DWRITE_TEXT_METRICS *metrics);
1122 HRESULT GetOverhangMetrics(DWRITE_OVERHANG_METRICS *overhangs);
1123 HRESULT GetClusterMetrics(
1124 DWRITE_CLUSTER_METRICS *metrics,
1125 UINT32 max_count,
1126 UINT32* act_count);
1128 HRESULT DetermineMinWidth(FLOAT* min_width);
1129 HRESULT HitTestPoint(
1130 FLOAT pointX,
1131 FLOAT pointY,
1132 BOOL* is_trailinghit,
1133 BOOL* is_inside,
1134 DWRITE_HIT_TEST_METRICS *metrics);
1136 HRESULT HitTestTextPosition(
1137 UINT32 textPosition,
1138 BOOL is_trailinghit,
1139 FLOAT* pointX,
1140 FLOAT* pointY,
1141 DWRITE_HIT_TEST_METRICS *metrics);
1143 HRESULT HitTestTextRange(
1144 UINT32 textPosition,
1145 UINT32 textLength,
1146 FLOAT originX,
1147 FLOAT originY,
1148 DWRITE_HIT_TEST_METRICS *metrics,
1149 UINT32 max_metricscount,
1150 UINT32* actual_metricscount);
1154 local,
1155 object,
1156 uuid(14885cc9-bab0-4f90-b6ed-5c366a2cd03d)
1158 interface IDWriteNumberSubstitution : IUnknown
1163 local,
1164 object,
1165 uuid(688e1a58-5094-47c8-adc8-fbcea60ae92b)
1167 interface IDWriteTextAnalysisSource : IUnknown
1169 HRESULT GetTextAtPosition(
1170 UINT32 position,
1171 WCHAR const** text,
1172 UINT32* text_len);
1174 HRESULT GetTextBeforePosition(
1175 UINT32 position,
1176 WCHAR const** text,
1177 UINT32* text_len);
1179 DWRITE_READING_DIRECTION GetParagraphReadingDirection();
1180 HRESULT GetLocaleName(
1181 UINT32 position,
1182 UINT32* text_len,
1183 WCHAR const** locale);
1185 HRESULT GetNumberSubstitution(
1186 UINT32 position,
1187 UINT32* text_len,
1188 IDWriteNumberSubstitution **substitution);
1192 local,
1193 object,
1194 uuid(5810cd44-0ca0-4701-b3fa-bec5182ae4f6)
1196 interface IDWriteTextAnalysisSink : IUnknown
1198 HRESULT SetScriptAnalysis(
1199 UINT32 position,
1200 UINT32 length,
1201 DWRITE_SCRIPT_ANALYSIS const* scriptanalysis);
1203 HRESULT SetLineBreakpoints(
1204 UINT32 position,
1205 UINT32 length,
1206 DWRITE_LINE_BREAKPOINT const* breakpoints);
1208 HRESULT SetBidiLevel(
1209 UINT32 position,
1210 UINT32 length,
1211 UINT8 explicitLevel,
1212 UINT8 resolvedLevel);
1214 HRESULT SetNumberSubstitution(
1215 UINT32 position,
1216 UINT32 length,
1217 IDWriteNumberSubstitution* substitution);
1221 local,
1222 object,
1223 uuid(b7e6163e-7f46-43b4-84b3-e4e6249c365d)
1225 interface IDWriteTextAnalyzer : IUnknown
1227 HRESULT AnalyzeScript(
1228 IDWriteTextAnalysisSource* source,
1229 UINT32 position,
1230 UINT32 length,
1231 IDWriteTextAnalysisSink* sink);
1233 HRESULT AnalyzeBidi(
1234 IDWriteTextAnalysisSource* source,
1235 UINT32 position,
1236 UINT32 length,
1237 IDWriteTextAnalysisSink* sink);
1239 HRESULT AnalyzeNumberSubstitution(
1240 IDWriteTextAnalysisSource* source,
1241 UINT32 position,
1242 UINT32 length,
1243 IDWriteTextAnalysisSink* sink);
1245 HRESULT AnalyzeLineBreakpoints(
1246 IDWriteTextAnalysisSource* source,
1247 UINT32 position,
1248 UINT32 length,
1249 IDWriteTextAnalysisSink* sink);
1251 HRESULT GetGlyphs(
1252 WCHAR const* text,
1253 UINT32 length,
1254 IDWriteFontFace* font_face,
1255 BOOL is_sideways,
1256 BOOL is_rtl,
1257 DWRITE_SCRIPT_ANALYSIS const* analysis,
1258 WCHAR const* locale,
1259 IDWriteNumberSubstitution* substitution,
1260 DWRITE_TYPOGRAPHIC_FEATURES const** features,
1261 UINT32 const* feature_range_len,
1262 UINT32 feature_ranges,
1263 UINT32 max_glyph_count,
1264 UINT16* clustermap,
1265 DWRITE_SHAPING_TEXT_PROPERTIES* text_props,
1266 UINT16* glyph_indices,
1267 DWRITE_SHAPING_GLYPH_PROPERTIES* glyph_props,
1268 UINT32* actual_glyph_count);
1270 HRESULT GetGlyphPlacements(
1271 WCHAR const* text,
1272 UINT16 const* clustermap,
1273 DWRITE_SHAPING_TEXT_PROPERTIES* props,
1274 UINT32 text_len,
1275 UINT16 const* glyph_indices,
1276 DWRITE_SHAPING_GLYPH_PROPERTIES const* glyph_props,
1277 UINT32 glyph_count,
1278 IDWriteFontFace * font_face,
1279 FLOAT fontEmSize,
1280 BOOL is_sideways,
1281 BOOL is_rtl,
1282 DWRITE_SCRIPT_ANALYSIS const* analysis,
1283 WCHAR const* locale,
1284 DWRITE_TYPOGRAPHIC_FEATURES const** features,
1285 UINT32 const* feature_range_len,
1286 UINT32 feature_ranges,
1287 FLOAT* glyph_advances,
1288 DWRITE_GLYPH_OFFSET* glyph_offsets);
1290 HRESULT GetGdiCompatibleGlyphPlacements(
1291 WCHAR const* text,
1292 UINT16 const* clustermap,
1293 DWRITE_SHAPING_TEXT_PROPERTIES* props,
1294 UINT32 text_len,
1295 UINT16 const* glyph_indices,
1296 DWRITE_SHAPING_GLYPH_PROPERTIES const* glyph_props,
1297 UINT32 glyph_count,
1298 IDWriteFontFace * font_face,
1299 FLOAT fontEmSize,
1300 FLOAT pixels_per_dip,
1301 DWRITE_MATRIX const* transform,
1302 BOOL use_gdi_natural,
1303 BOOL is_sideways,
1304 BOOL is_rtl,
1305 DWRITE_SCRIPT_ANALYSIS const* analysis,
1306 WCHAR const* locale,
1307 DWRITE_TYPOGRAPHIC_FEATURES const** features,
1308 UINT32 const* feature_range_lengths,
1309 UINT32 feature_ranges,
1310 FLOAT* glyph_advances,
1311 DWRITE_GLYPH_OFFSET* glyph_offsets);
1315 local,
1316 object,
1317 uuid(7d97dbf7-e085-42d4-81e3-6a883bded118)
1319 interface IDWriteGlyphRunAnalysis : IUnknown
1321 HRESULT GetAlphaTextureBounds(DWRITE_TEXTURE_TYPE type, RECT* bounds);
1322 HRESULT CreateAlphaTexture(DWRITE_TEXTURE_TYPE type, RECT const* bounds, BYTE* alphaValues, UINT32 bufferSize);
1323 HRESULT GetAlphaBlendParams(
1324 IDWriteRenderingParams* renderingParams,
1325 FLOAT* blendGamma,
1326 FLOAT* blendEnhancedContrast,
1327 FLOAT* blendClearTypeLevel);
1331 local,
1332 object,
1333 uuid(b859ee5a-d838-4b5b-a2e8-1adc7d93db48)
1335 interface IDWriteFactory : IUnknown
1337 HRESULT GetSystemFontCollection(IDWriteFontCollection **collection,
1338 [defaultvalue(FALSE)] BOOL check_for_updates);
1340 HRESULT CreateCustomFontCollection(
1341 IDWriteFontCollectionLoader *loader,
1342 void const *key,
1343 UINT32 key_size,
1344 IDWriteFontCollection **collection);
1346 HRESULT RegisterFontCollectionLoader(IDWriteFontCollectionLoader *loader);
1348 HRESULT UnregisterFontCollectionLoader(IDWriteFontCollectionLoader *loader);
1350 HRESULT CreateFontFileReference(
1351 WCHAR const *path,
1352 FILETIME const *writetime,
1353 IDWriteFontFile **font_file);
1355 HRESULT CreateCustomFontFileReference(
1356 void const *reference_key,
1357 UINT32 key_size,
1358 IDWriteFontFileLoader *loader,
1359 IDWriteFontFile **font_file);
1361 HRESULT CreateFontFace(
1362 DWRITE_FONT_FACE_TYPE facetype,
1363 UINT32 files_number,
1364 IDWriteFontFile* const* font_files,
1365 UINT32 index,
1366 DWRITE_FONT_SIMULATIONS sim_flags,
1367 IDWriteFontFace **font_face);
1369 HRESULT CreateRenderingParams(IDWriteRenderingParams **params);
1371 HRESULT CreateMonitorRenderingParams(
1372 HMONITOR monitor,
1373 IDWriteRenderingParams **params);
1375 HRESULT CreateCustomRenderingParams(
1376 FLOAT gamma,
1377 FLOAT enhancedContrast,
1378 FLOAT cleartype_level,
1379 DWRITE_PIXEL_GEOMETRY geometry,
1380 DWRITE_RENDERING_MODE mode,
1381 IDWriteRenderingParams **params);
1383 HRESULT RegisterFontFileLoader(IDWriteFontFileLoader *loader);
1385 HRESULT UnregisterFontFileLoader(IDWriteFontFileLoader *loader);
1387 HRESULT CreateTextFormat(
1388 WCHAR const* family_name,
1389 IDWriteFontCollection *collection,
1390 DWRITE_FONT_WEIGHT weight,
1391 DWRITE_FONT_STYLE style,
1392 DWRITE_FONT_STRETCH stretch,
1393 FLOAT size,
1394 WCHAR const *locale,
1395 IDWriteTextFormat **format);
1397 HRESULT CreateTypography(IDWriteTypography **typography);
1399 HRESULT GetGdiInterop(IDWriteGdiInterop **gdi_interop);
1401 HRESULT CreateTextLayout(
1402 WCHAR const* string,
1403 UINT32 len,
1404 IDWriteTextFormat *format,
1405 FLOAT max_width,
1406 FLOAT max_height,
1407 IDWriteTextLayout **layout);
1409 HRESULT CreateGdiCompatibleTextLayout(
1410 WCHAR const* string,
1411 UINT32 len,
1412 IDWriteTextFormat *format,
1413 FLOAT layout_width,
1414 FLOAT layout_height,
1415 FLOAT pixels_per_dip,
1416 DWRITE_MATRIX const* transform,
1417 BOOL use_gdi_natural,
1418 IDWriteTextLayout **layout);
1420 HRESULT CreateEllipsisTrimmingSign(
1421 IDWriteTextFormat *format,
1422 IDWriteInlineObject **trimming_sign);
1424 HRESULT CreateTextAnalyzer(IDWriteTextAnalyzer **analyzer);
1426 HRESULT CreateNumberSubstitution(
1427 DWRITE_NUMBER_SUBSTITUTION_METHOD method,
1428 WCHAR const* locale,
1429 BOOL ignore_user_override,
1430 IDWriteNumberSubstitution **substitution);
1432 HRESULT CreateGlyphRunAnalysis(
1433 DWRITE_GLYPH_RUN const *glyph_run,
1434 FLOAT pixels_per_dip,
1435 DWRITE_MATRIX const* transform,
1436 DWRITE_RENDERING_MODE rendering_mode,
1437 DWRITE_MEASURING_MODE measuring_mode,
1438 FLOAT baseline_x,
1439 FLOAT baseline_y,
1440 IDWriteGlyphRunAnalysis **analysis);
1443 cpp_quote("HRESULT WINAPI DWriteCreateFactory(DWRITE_FACTORY_TYPE,REFIID,IUnknown**);")
1445 /* error codes */
1446 cpp_quote("#define FACILITY_DWRITE 0x898")
1447 cpp_quote("#define DWRITE_ERR_BASE 0x5000")
1448 cpp_quote("#define MAKE_DWRITE_HR(severity, code) MAKE_HRESULT(severity, FACILITY_DWRITE, (DWRITE_ERR_BASE + code))")
1449 cpp_quote("#define MAKE_DWRITE_HR_ERR(code) MAKE_DWRITE_HR(SEVERITY_ERROR, code)")