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
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")
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_TRUETYPE_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
;
58 typedef enum DWRITE_FONT_FACE_TYPE
60 DWRITE_FONT_FACE_TYPE_CFF
,
61 DWRITE_FONT_FACE_TYPE_TRUETYPE
,
62 DWRITE_FONT_FACE_TYPE_TRUETYPE_COLLECTION
,
63 DWRITE_FONT_FACE_TYPE_TYPE1
,
64 DWRITE_FONT_FACE_TYPE_VECTOR
,
65 DWRITE_FONT_FACE_TYPE_BITMAP
,
66 DWRITE_FONT_FACE_TYPE_UNKNOWN
,
67 DWRITE_FONT_FACE_TYPE_RAW_CFF
68 } DWRITE_FONT_FACE_TYPE
;
70 typedef enum DWRITE_FONT_WEIGHT
72 DWRITE_FONT_WEIGHT_THIN
= 100,
73 DWRITE_FONT_WEIGHT_EXTRA_LIGHT
= 200,
74 DWRITE_FONT_WEIGHT_ULTRA_LIGHT
= 200,
75 DWRITE_FONT_WEIGHT_LIGHT
= 300,
76 DWRITE_FONT_WEIGHT_SEMI_LIGHT
= 350,
77 DWRITE_FONT_WEIGHT_NORMAL
= 400,
78 DWRITE_FONT_WEIGHT_REGULAR
= 400,
79 DWRITE_FONT_WEIGHT_MEDIUM
= 500,
80 DWRITE_FONT_WEIGHT_DEMI_BOLD
= 600,
81 DWRITE_FONT_WEIGHT_SEMI_BOLD
= 600,
82 DWRITE_FONT_WEIGHT_BOLD
= 700,
83 DWRITE_FONT_WEIGHT_EXTRA_BOLD
= 800,
84 DWRITE_FONT_WEIGHT_ULTRA_BOLD
= 800,
85 DWRITE_FONT_WEIGHT_BLACK
= 900,
86 DWRITE_FONT_WEIGHT_HEAVY
= 900,
87 DWRITE_FONT_WEIGHT_EXTRA_BLACK
= 950,
88 DWRITE_FONT_WEIGHT_ULTRA_BLACK
= 950
91 typedef enum DWRITE_FONT_STRETCH
93 DWRITE_FONT_STRETCH_UNDEFINED
= 0,
94 DWRITE_FONT_STRETCH_ULTRA_CONDENSED
= 1,
95 DWRITE_FONT_STRETCH_EXTRA_CONDENSED
= 2,
96 DWRITE_FONT_STRETCH_CONDENSED
= 3,
97 DWRITE_FONT_STRETCH_SEMI_CONDENSED
= 4,
98 DWRITE_FONT_STRETCH_NORMAL
= 5,
99 DWRITE_FONT_STRETCH_MEDIUM
= 5,
100 DWRITE_FONT_STRETCH_SEMI_EXPANDED
= 6,
101 DWRITE_FONT_STRETCH_EXPANDED
= 7,
102 DWRITE_FONT_STRETCH_EXTRA_EXPANDED
= 8,
103 DWRITE_FONT_STRETCH_ULTRA_EXPANDED
= 9
104 } DWRITE_FONT_STRETCH
;
106 typedef enum DWRITE_FONT_STYLE
108 DWRITE_FONT_STYLE_NORMAL
,
109 DWRITE_FONT_STYLE_OBLIQUE
,
110 DWRITE_FONT_STYLE_ITALIC
113 typedef enum DWRITE_INFORMATIONAL_STRING_ID
115 DWRITE_INFORMATIONAL_STRING_NONE
,
116 DWRITE_INFORMATIONAL_STRING_COPYRIGHT_NOTICE
,
117 DWRITE_INFORMATIONAL_STRING_VERSION_STRINGS
,
118 DWRITE_INFORMATIONAL_STRING_TRADEMARK
,
119 DWRITE_INFORMATIONAL_STRING_MANUFACTURER
,
120 DWRITE_INFORMATIONAL_STRING_DESIGNER
,
121 DWRITE_INFORMATIONAL_STRING_DESIGNER_URL
,
122 DWRITE_INFORMATIONAL_STRING_DESCRIPTION
,
123 DWRITE_INFORMATIONAL_STRING_FONT_VENDOR_URL
,
124 DWRITE_INFORMATIONAL_STRING_LICENSE_DESCRIPTION
,
125 DWRITE_INFORMATIONAL_STRING_LICENSE_INFO_URL
,
126 DWRITE_INFORMATIONAL_STRING_WIN32_FAMILY_NAMES
,
127 DWRITE_INFORMATIONAL_STRING_WIN32_SUBFAMILY_NAMES
,
128 DWRITE_INFORMATIONAL_STRING_PREFERRED_FAMILY_NAMES
,
129 DWRITE_INFORMATIONAL_STRING_PREFERRED_SUBFAMILY_NAMES
,
130 DWRITE_INFORMATIONAL_STRING_SAMPLE_TEXT
,
131 DWRITE_INFORMATIONAL_STRING_FULL_NAME
,
132 DWRITE_INFORMATIONAL_STRING_POSTSCRIPT_NAME
,
133 DWRITE_INFORMATIONAL_STRING_POSTSCRIPT_CID_NAME
134 } DWRITE_INFORMATIONAL_STRING_ID
;
136 typedef enum DWRITE_FONT_SIMULATIONS
138 DWRITE_FONT_SIMULATIONS_NONE
,
139 DWRITE_FONT_SIMULATIONS_BOLD
,
140 DWRITE_FONT_SIMULATIONS_OBLIQUE
141 } DWRITE_FONT_SIMULATIONS
;
143 typedef enum DWRITE_PIXEL_GEOMETRY
145 DWRITE_PIXEL_GEOMETRY_FLAT
,
146 DWRITE_PIXEL_GEOMETRY_RGB
,
147 DWRITE_PIXEL_GEOMETRY_BGR
148 } DWRITE_PIXEL_GEOMETRY
;
150 typedef enum DWRITE_RENDERING_MODE
152 DWRITE_RENDERING_MODE_DEFAULT
,
153 DWRITE_RENDERING_MODE_ALIASED
,
154 DWRITE_RENDERING_MODE_GDI_CLASSIC
,
155 DWRITE_RENDERING_MODE_GDI_NATURAL
,
156 DWRITE_RENDERING_MODE_NATURAL
,
157 DWRITE_RENDERING_MODE_NATURAL_SYMMETRIC
,
158 DWRITE_RENDERING_MODE_OUTLINE
,
159 DWRITE_RENDERING_MODE_CLEARTYPE_GDI_CLASSIC
= DWRITE_RENDERING_MODE_GDI_CLASSIC
,
160 DWRITE_RENDERING_MODE_CLEARTYPE_GDI_NATURAL
= DWRITE_RENDERING_MODE_GDI_NATURAL
,
161 DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL
= DWRITE_RENDERING_MODE_NATURAL
,
162 DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL_SYMMETRIC
= DWRITE_RENDERING_MODE_NATURAL_SYMMETRIC
163 } DWRITE_RENDERING_MODE
;
165 typedef enum DWRITE_TEXT_ALIGNMENT
167 DWRITE_TEXT_ALIGNMENT_LEADING
,
168 DWRITE_TEXT_ALIGNMENT_TRAILING
,
169 DWRITE_TEXT_ALIGNMENT_CENTER
,
170 DWRITE_TEXT_ALIGNMENT_JUSTIFIED
171 } DWRITE_TEXT_ALIGNMENT
;
173 typedef enum DWRITE_PARAGRAPH_ALIGNMENT
175 DWRITE_PARAGRAPH_ALIGNMENT_NEAR
,
176 DWRITE_PARAGRAPH_ALIGNMENT_FAR
,
177 DWRITE_PARAGRAPH_ALIGNMENT_CENTER
178 } DWRITE_PARAGRAPH_ALIGNMENT
;
180 typedef enum DWRITE_WORD_WRAPPING
182 DWRITE_WORD_WRAPPING_WRAP
,
183 DWRITE_WORD_WRAPPING_NO_WRAP
,
184 DWRITE_WORD_WRAPPING_EMERGENCY_BREAK
,
185 DWRITE_WORD_WRAPPING_WHOLE_WORD
,
186 DWRITE_WORD_WRAPPING_CHARACTER
187 } DWRITE_WORD_WRAPPING
;
189 typedef enum DWRITE_READING_DIRECTION
191 DWRITE_READING_DIRECTION_LEFT_TO_RIGHT
,
192 DWRITE_READING_DIRECTION_RIGHT_TO_LEFT
,
193 DWRITE_READING_DIRECTION_TOP_TO_BOTTOM
,
194 DWRITE_READING_DIRECTION_BOTTOM_TO_TOP
195 } DWRITE_READING_DIRECTION
;
197 typedef enum DWRITE_FLOW_DIRECTION
199 DWRITE_FLOW_DIRECTION_TOP_TO_BOTTOM
,
200 DWRITE_FLOW_DIRECTION_BOTTOM_TO_TOP
,
201 DWRITE_FLOW_DIRECTION_LEFT_TO_RIGHT
,
202 DWRITE_FLOW_DIRECTION_RIGHT_TO_LEFT
203 } DWRITE_FLOW_DIRECTION
;
205 typedef enum DWRITE_TRIMMING_GRANULARITY
207 DWRITE_TRIMMING_GRANULARITY_NONE
,
208 DWRITE_TRIMMING_GRANULARITY_CHARACTER
,
209 DWRITE_TRIMMING_GRANULARITY_WORD
210 } DWRITE_TRIMMING_GRANULARITY
;
212 typedef enum DWRITE_BREAK_CONDITION
214 DWRITE_BREAK_CONDITION_NEUTRAL
,
215 DWRITE_BREAK_CONDITION_CAN_BREAK
,
216 DWRITE_BREAK_CONDITION_MAY_NOT_BREAK
,
217 DWRITE_BREAK_CONDITION_MUST_BREAK
218 } DWRITE_BREAK_CONDITION
;
220 typedef enum DWRITE_LINE_SPACING_METHOD
222 DWRITE_LINE_SPACING_METHOD_DEFAULT
,
223 DWRITE_LINE_SPACING_METHOD_UNIFORM
,
224 DWRITE_LINE_SPACING_METHOD_PROPORTIONAL
225 } DWRITE_LINE_SPACING_METHOD
;
227 cpp_quote
("#define DWRITE_MAKE_OPENTYPE_TAG(a,b,c,d) ( \\")
228 cpp_quote
(" ((UINT32)(UINT8)(d) << 24) | \\")
229 cpp_quote
(" ((UINT32)(UINT8)(c) << 16) | \\")
230 cpp_quote
(" ((UINT32)(UINT8)(b) << 8) | \\")
231 cpp_quote
(" (UINT32)(UINT8)(a))")
233 typedef enum DWRITE_FONT_FEATURE_TAG
235 DWRITE_FONT_FEATURE_TAG_ALTERNATIVE_FRACTIONS
= 0x63726661, /* 'afrc' */
236 DWRITE_FONT_FEATURE_TAG_PETITE_CAPITALS_FROM_CAPITALS
= 0x63703263, /* 'c2pc' */
237 DWRITE_FONT_FEATURE_TAG_SMALL_CAPITALS_FROM_CAPITALS
= 0x63733263, /* 'c2sc' */
238 DWRITE_FONT_FEATURE_TAG_CONTEXTUAL_ALTERNATES
= 0x746c6163, /* 'calt' */
239 DWRITE_FONT_FEATURE_TAG_CASE_SENSITIVE_FORMS
= 0x65736163, /* 'case' */
240 DWRITE_FONT_FEATURE_TAG_GLYPH_COMPOSITION_DECOMPOSITION
= 0x706d6363, /* 'ccmp' */
241 DWRITE_FONT_FEATURE_TAG_CONTEXTUAL_LIGATURES
= 0x67696c63, /* 'clig' */
242 DWRITE_FONT_FEATURE_TAG_CAPITAL_SPACING
= 0x70737063, /* 'cpsp' */
243 DWRITE_FONT_FEATURE_TAG_CONTEXTUAL_SWASH
= 0x68777363, /* 'cswh' */
244 DWRITE_FONT_FEATURE_TAG_CURSIVE_POSITIONING
= 0x73727563, /* 'curs' */
245 DWRITE_FONT_FEATURE_TAG_DEFAULT
= 0x746c6664, /* 'dflt' */
246 DWRITE_FONT_FEATURE_TAG_DISCRETIONARY_LIGATURES
= 0x67696c64, /* 'dlig' */
247 DWRITE_FONT_FEATURE_TAG_EXPERT_FORMS
= 0x74707865, /* 'expt' */
248 DWRITE_FONT_FEATURE_TAG_FRACTIONS
= 0x63617266, /* 'frac' */
249 DWRITE_FONT_FEATURE_TAG_FULL_WIDTH
= 0x64697766, /* 'fwid' */
250 DWRITE_FONT_FEATURE_TAG_HALF_FORMS
= 0x666c6168, /* 'half' */
251 DWRITE_FONT_FEATURE_TAG_HALANT_FORMS
= 0x6e6c6168, /* 'haln' */
252 DWRITE_FONT_FEATURE_TAG_ALTERNATE_HALF_WIDTH
= 0x746c6168, /* 'halt' */
253 DWRITE_FONT_FEATURE_TAG_HISTORICAL_FORMS
= 0x74736968, /* 'hist' */
254 DWRITE_FONT_FEATURE_TAG_HORIZONTAL_KANA_ALTERNATES
= 0x616e6b68, /* 'hkna' */
255 DWRITE_FONT_FEATURE_TAG_HISTORICAL_LIGATURES
= 0x67696c68, /* 'hlig' */
256 DWRITE_FONT_FEATURE_TAG_HALF_WIDTH
= 0x64697768, /* 'hwid' */
257 DWRITE_FONT_FEATURE_TAG_HOJO_KANJI_FORMS
= 0x6f6a6f68, /* 'hojo' */
258 DWRITE_FONT_FEATURE_TAG_JIS04_FORMS
= 0x3430706a, /* 'jp04' */
259 DWRITE_FONT_FEATURE_TAG_JIS78_FORMS
= 0x3837706a, /* 'jp78' */
260 DWRITE_FONT_FEATURE_TAG_JIS83_FORMS
= 0x3338706a, /* 'jp83' */
261 DWRITE_FONT_FEATURE_TAG_JIS90_FORMS
= 0x3039706a, /* 'jp90' */
262 DWRITE_FONT_FEATURE_TAG_KERNING
= 0x6e72656b, /* 'kern' */
263 DWRITE_FONT_FEATURE_TAG_STANDARD_LIGATURES
= 0x6167696c, /* 'liga' */
264 DWRITE_FONT_FEATURE_TAG_LINING_FIGURES
= 0x6d756e6c, /* 'lnum' */
265 DWRITE_FONT_FEATURE_TAG_LOCALIZED_FORMS
= 0x6c636f6c, /* 'locl' */
266 DWRITE_FONT_FEATURE_TAG_MARK_POSITIONING
= 0x6b72616d, /* 'mark' */
267 DWRITE_FONT_FEATURE_TAG_MATHEMATICAL_GREEK
= 0x6b72676d, /* 'mgrk' */
268 DWRITE_FONT_FEATURE_TAG_MARK_TO_MARK_POSITIONING
= 0x6b6d6b6d, /* 'mkmk' */
269 DWRITE_FONT_FEATURE_TAG_ALTERNATE_ANNOTATION_FORMS
= 0x746c616e, /* 'nalt' */
270 DWRITE_FONT_FEATURE_TAG_NLC_KANJI_FORMS
= 0x6b636c6e, /* 'nlck' */
271 DWRITE_FONT_FEATURE_TAG_OLD_STYLE_FIGURES
= 0x6d756e6f, /* 'onum' */
272 DWRITE_FONT_FEATURE_TAG_ORDINALS
= 0x6e64726f, /* 'ordn' */
273 DWRITE_FONT_FEATURE_TAG_PROPORTIONAL_ALTERNATE_WIDTH
= 0x746c6170, /* 'palt' */
274 DWRITE_FONT_FEATURE_TAG_PETITE_CAPITALS
= 0x70616370, /* 'pcap' */
275 DWRITE_FONT_FEATURE_TAG_PROPORTIONAL_FIGURES
= 0x6d756e70, /* 'pnum' */
276 DWRITE_FONT_FEATURE_TAG_PROPORTIONAL_WIDTHS
= 0x64697770, /* 'pwid' */
277 DWRITE_FONT_FEATURE_TAG_QUARTER_WIDTHS
= 0x64697771, /* 'qwid' */
278 DWRITE_FONT_FEATURE_TAG_REQUIRED_LIGATURES
= 0x67696c72, /* 'rlig' */
279 DWRITE_FONT_FEATURE_TAG_RUBY_NOTATION_FORMS
= 0x79627572, /* 'ruby' */
280 DWRITE_FONT_FEATURE_TAG_STYLISTIC_ALTERNATES
= 0x746c6173, /* 'salt' */
281 DWRITE_FONT_FEATURE_TAG_SCIENTIFIC_INFERIORS
= 0x666e6973, /* 'sinf' */
282 DWRITE_FONT_FEATURE_TAG_SMALL_CAPITALS
= 0x70636d73, /* 'smcp' */
283 DWRITE_FONT_FEATURE_TAG_SIMPLIFIED_FORMS
= 0x6c706d73, /* 'smpl' */
284 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_1
= 0x31307373, /* 'ss01' */
285 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_2
= 0x32307373, /* 'ss02' */
286 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_3
= 0x33307373, /* 'ss03' */
287 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_4
= 0x34307373, /* 'ss04' */
288 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_5
= 0x35307373, /* 'ss05' */
289 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_6
= 0x36307373, /* 'ss06' */
290 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_7
= 0x37307373, /* 'ss07' */
291 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_8
= 0x38307373, /* 'ss08' */
292 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_9
= 0x39307373, /* 'ss09' */
293 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_10
= 0x30317373, /* 'ss10' */
294 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_11
= 0x31317373, /* 'ss11' */
295 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_12
= 0x32317373, /* 'ss12' */
296 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_13
= 0x33317373, /* 'ss13' */
297 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_14
= 0x34317373, /* 'ss14' */
298 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_15
= 0x35317373, /* 'ss15' */
299 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_16
= 0x36317373, /* 'ss16' */
300 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_17
= 0x37317373, /* 'ss17' */
301 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_18
= 0x38317373, /* 'ss18' */
302 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_19
= 0x39317373, /* 'ss19' */
303 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_20
= 0x30327373, /* 'ss20' */
304 DWRITE_FONT_FEATURE_TAG_SUBSCRIPT
= 0x73627573, /* 'subs' */
305 DWRITE_FONT_FEATURE_TAG_SUPERSCRIPT
= 0x73707573, /* 'sups' */
306 DWRITE_FONT_FEATURE_TAG_SWASH
= 0x68737773, /* 'swsh' */
307 DWRITE_FONT_FEATURE_TAG_TITLING
= 0x6c746974, /* 'titl' */
308 DWRITE_FONT_FEATURE_TAG_TRADITIONAL_NAME_FORMS
= 0x6d616e74, /* 'tnam' */
309 DWRITE_FONT_FEATURE_TAG_TABULAR_FIGURES
= 0x6d756e74, /* 'tnum' */
310 DWRITE_FONT_FEATURE_TAG_TRADITIONAL_FORMS
= 0x64617274, /* 'trad' */
311 DWRITE_FONT_FEATURE_TAG_THIRD_WIDTHS
= 0x64697774, /* 'twid' */
312 DWRITE_FONT_FEATURE_TAG_UNICASE
= 0x63696e75, /* 'unic' */
313 DWRITE_FONT_FEATURE_TAG_VERTICAL_WRITING
= 0x74726576, /* 'vert' */
314 DWRITE_FONT_FEATURE_TAG_VERTICAL_ALTERNATES_AND_ROTATION
= 0x32747276, /* 'vrt2' */
315 DWRITE_FONT_FEATURE_TAG_SLASHED_ZERO
= 0x6f72657a, /* 'zero' */
316 } DWRITE_FONT_FEATURE_TAG
;
318 typedef enum DWRITE_SCRIPT_SHAPES
320 DWRITE_SCRIPT_SHAPES_DEFAULT
= 0,
321 DWRITE_SCRIPT_SHAPES_NO_VISUAL
= 1
322 } DWRITE_SCRIPT_SHAPES
;
324 typedef enum DWRITE_NUMBER_SUBSTITUTION_METHOD
326 DWRITE_NUMBER_SUBSTITUTION_METHOD_FROM_CULTURE
,
327 DWRITE_NUMBER_SUBSTITUTION_METHOD_CONTEXTUAL
,
328 DWRITE_NUMBER_SUBSTITUTION_METHOD_NONE
,
329 DWRITE_NUMBER_SUBSTITUTION_METHOD_NATIONAL
,
330 DWRITE_NUMBER_SUBSTITUTION_METHOD_TRADITIONAL
331 } DWRITE_NUMBER_SUBSTITUTION_METHOD
;
333 cpp_quote
("#define DWRITE_ALPHA_MAX 255")
335 typedef enum DWRITE_TEXTURE_TYPE
337 DWRITE_TEXTURE_ALIASED_1x1
,
338 DWRITE_TEXTURE_CLEARTYPE_3x1
339 } DWRITE_TEXTURE_TYPE
;
341 typedef struct DWRITE_FONT_METRICS
343 UINT16 designUnitsPerEm
;
349 INT16 underlinePosition
;
350 UINT16 underlineThickness
;
351 INT16 strikethroughPosition
;
352 UINT16 strikethroughThickness
;
353 } DWRITE_FONT_METRICS
;
355 typedef struct DWRITE_GLYPH_METRICS
357 INT32 leftSideBearing
;
359 INT32 rightSideBearing
;
360 INT32 topSideBearing
;
361 UINT32 advanceHeight
;
362 INT32 bottomSideBearing
;
363 INT32 verticalOriginY
;
364 } DWRITE_GLYPH_METRICS
;
366 typedef struct DWRITE_GLYPH_OFFSET
369 FLOAT ascenderOffset
;
370 } DWRITE_GLYPH_OFFSET
;
372 typedef struct DWRITE_MATRIX
382 typedef struct DWRITE_TRIMMING
384 DWRITE_TRIMMING_GRANULARITY granularity
;
386 UINT32 delimiterCount
;
389 cpp_quote
("#ifndef __d2d1_h__")
390 typedef struct DWRITE_GLYPH_RUN DWRITE_GLYPH_RUN
;
391 cpp_quote
("#endif /* __d2d1_h__ */")
393 struct DWRITE_GLYPH_RUN
395 IDWriteFontFace
* fontFace
;
398 UINT16
const* glyphIndices
;
399 FLOAT const* glyphAdvances
;
400 DWRITE_GLYPH_OFFSET
const* glyphOffsets
;
405 typedef struct DWRITE_GLYPH_RUN_DESCRIPTION
407 WCHAR
const* localeName
;
410 UINT16
const* clusterMap
;
412 } DWRITE_GLYPH_RUN_DESCRIPTION
;
414 typedef struct DWRITE_UNDERLINE
420 DWRITE_READING_DIRECTION readingDirection
;
421 DWRITE_FLOW_DIRECTION flowDirection
;
422 WCHAR
const* localeName
;
423 DWRITE_MEASURING_MODE measuringMode
;
426 typedef struct DWRITE_STRIKETHROUGH
431 DWRITE_READING_DIRECTION readingDirection
;
432 DWRITE_FLOW_DIRECTION flowDirection
;
433 WCHAR
const* localeName
;
434 DWRITE_MEASURING_MODE measuringMode
;
435 } DWRITE_STRIKETHROUGH
;
437 typedef struct DWRITE_INLINE_OBJECT_METRICS
442 BOOL supportsSideways
;
443 } DWRITE_INLINE_OBJECT_METRICS
;
445 typedef struct DWRITE_OVERHANG_METRICS
451 } DWRITE_OVERHANG_METRICS
;
453 typedef struct DWRITE_FONT_FEATURE
455 DWRITE_FONT_FEATURE_TAG nameTag
;
457 } DWRITE_FONT_FEATURE
;
459 typedef struct DWRITE_TEXT_RANGE
461 UINT32 startPosition
;
465 typedef struct DWRITE_LINE_METRICS
468 UINT32 trailingWhitespaceLength
;
469 UINT32 newlineLength
;
473 } DWRITE_LINE_METRICS
;
475 typedef struct DWRITE_TEXT_METRICS
480 FLOAT widthIncludingTrailingWhitespace
;
484 UINT32 maxBidiReorderingDepth
;
486 } DWRITE_TEXT_METRICS
;
488 typedef struct DWRITE_CLUSTER_METRICS
492 UINT16 canWrapLineAfter
: 1;
493 UINT16 isWhitespace
: 1;
494 UINT16 isNewline
: 1;
495 UINT16 isSoftHyphen
: 1;
496 UINT16 isRightToLeft
: 1;
498 } DWRITE_CLUSTER_METRICS
;
500 typedef struct DWRITE_HIT_TEST_METRICS
511 } DWRITE_HIT_TEST_METRICS
;
513 typedef struct DWRITE_SCRIPT_ANALYSIS
516 DWRITE_SCRIPT_SHAPES shapes
;
517 } DWRITE_SCRIPT_ANALYSIS
;
519 typedef struct DWRITE_LINE_BREAKPOINT
521 UINT8 breakConditionBefore
: 2;
522 UINT8 breakConditionAfter
: 2;
523 UINT8 isWhitespace
: 1;
524 UINT8 isSoftHyphen
: 1;
526 } DWRITE_LINE_BREAKPOINT
;
528 typedef struct DWRITE_TYPOGRAPHIC_FEATURES
530 DWRITE_FONT_FEATURE
* features
;
532 } DWRITE_TYPOGRAPHIC_FEATURES
;
534 typedef struct DWRITE_SHAPING_TEXT_PROPERTIES
536 UINT16 isShapedAlone
: 1;
537 UINT16 reserved
: 15;
538 } DWRITE_SHAPING_TEXT_PROPERTIES
;
540 typedef struct DWRITE_SHAPING_GLYPH_PROPERTIES
542 UINT16 justification
: 4;
543 UINT16 isClusterStart
: 1;
544 UINT16 isDiacritic
: 1;
545 UINT16 isZeroWidthSpace
: 1;
547 } DWRITE_SHAPING_GLYPH_PROPERTIES
;
552 uuid(6d4865fe
-0ab8
-4d91
-8f62
-5dd6be34a3e0
)
554 interface IDWriteFontFileStream
: IUnknown
556 HRESULT ReadFileFragment
(
557 void const **fragment_start
,
559 UINT64 fragment_size
,
560 void **fragment_context
);
562 void ReleaseFileFragment
(void *fragment_context
);
563 HRESULT GetFileSize
(UINT64
*size
);
564 HRESULT GetLastWriteTime
(UINT64
*last_writetime
);
570 uuid(727cad4e
-d6af
-4c9e
-8a08
-d695b11caa49
)
572 interface IDWriteFontFileLoader
: IUnknown
574 HRESULT CreateStreamFromKey
(
577 IDWriteFontFileStream
**stream
);
583 uuid(b2d9f3ec
-c9fe
-4a11
-a2ec
-d86208f7c0a2
)
585 interface IDWriteLocalFontFileLoader
: IDWriteFontFileLoader
587 HRESULT GetFilePathLengthFromKey
(void const *key
, UINT32 key_size
, UINT32
*length
);
588 HRESULT GetFilePathFromKey
(void const *key
, UINT32 key_size
, WCHAR
*path
, UINT32 length
);
589 HRESULT GetLastWriteTimeFromKey
(void const *key
, UINT32 key_size
, FILETIME
*writetime
);
595 uuid(739d886a
-cef5
-47dc
-8769-1a8b41bebbb0
)
597 interface IDWriteFontFile
: IUnknown
599 HRESULT GetReferenceKey
(
603 HRESULT GetLoader
(IDWriteFontFileLoader
**loader
);
606 BOOL
*is_supported_fonttype
,
607 DWRITE_FONT_FILE_TYPE
*file_type
,
608 DWRITE_FONT_FACE_TYPE
*face_type
,
615 uuid(72755049-5ff7
-435d
-8348-4be97cfa6c7c
)
617 interface IDWriteFontFileEnumerator
: IUnknown
619 HRESULT MoveNext
(BOOL
*has_current_file
);
620 HRESULT GetCurrentFontFile
(IDWriteFontFile
**font_file
);
626 uuid(cca920e4
-52f0
-492b
-bfa8
-29c72ee0a468
)
628 interface IDWriteFontCollectionLoader
: IUnknown
630 HRESULT CreateEnumeratorFromKey
(
631 IDWriteFactory
* factory
,
634 IDWriteFontFileEnumerator
**enumerator
);
640 uuid(08256209-099a
-4b34
-b86d
-c22b110e7771
)
642 interface IDWriteLocalizedStrings
: IUnknown
646 HRESULT FindLocaleName
(
647 WCHAR
const *locale_name
,
651 HRESULT GetLocaleNameLength
(UINT32 index
, UINT32
*length
);
652 HRESULT GetLocaleName
(UINT32 index
, WCHAR
*locale_name
, UINT32 size
);
653 HRESULT GetStringLength
(UINT32 index
, UINT32
*length
);
654 HRESULT GetString
(UINT32 index
, WCHAR
*buffer
, UINT32 size
);
660 uuid(2f0da53a
-2add
-47cd
-82ee
-d9ec34688e75
)
662 interface IDWriteRenderingParams
: IUnknown
665 FLOAT GetEnhancedContrast
();
666 FLOAT GetClearTypeLevel
();
667 DWRITE_PIXEL_GEOMETRY GetPixelGeometry
();
668 DWRITE_RENDERING_MODE GetRenderingMode
();
674 uuid(5f49804d
-7024-4d43
-bfa9
-d25984f53849
)
676 interface IDWriteFontFace
: IUnknown
678 DWRITE_FONT_FACE_TYPE GetType
();
679 HRESULT GetFiles
(UINT32
*number_of_files
, IDWriteFontFile
**fontfiles
);
681 DWRITE_FONT_SIMULATIONS GetSimulations
();
683 void GetMetrics
(DWRITE_FONT_METRICS
*metrics
);
684 UINT16 GetGlyphCount
();
686 HRESULT GetDesignGlyphMetrics
(
687 UINT16
const *glyph_indices
,
689 DWRITE_GLYPH_METRICS
*metrics
,
690 [defaultvalue(FALSE
)] BOOL is_sideways
);
692 HRESULT GetGlyphIndices
(
693 UINT32
const *codepoints
,
695 UINT16
*glyph_indices
);
697 HRESULT TryGetFontTable
(
699 const void **table_data
,
704 void ReleaseFontTable
(void *table_context
);
706 HRESULT GetGlyphRunOutline
(
708 UINT16
const *glyph_indices
,
709 FLOAT const* glyph_advances
,
710 DWRITE_GLYPH_OFFSET
const *glyph_offsets
,
714 IDWriteGeometrySink
*geometrysink
);
716 HRESULT GetRecommendedRenderingMode
(
718 FLOAT pixels_per_dip
,
719 DWRITE_MEASURING_MODE mode
,
720 IDWriteRenderingParams
* params
,
721 DWRITE_RENDERING_MODE
* rendering_mode
);
723 HRESULT GetGdiCompatibleMetrics
(
725 FLOAT pixels_per_dip
,
726 DWRITE_MATRIX
const *transform
,
727 DWRITE_FONT_METRICS
*metrics
);
729 HRESULT GetGdiCompatibleGlyphMetrics
(
731 FLOAT pixels_per_dip
,
732 DWRITE_MATRIX
const *transform
,
733 BOOL use_gdi_natural
,
734 UINT16
const *glyph_indices
,
736 DWRITE_GLYPH_METRICS
*metrics
,
737 [defaultvalue(FALSE
)] BOOL is_sideways
);
743 uuid(acd16696
-8c14
-4f5d
-877e
-fe3fc1d32737
)
745 interface IDWriteFont
: IUnknown
747 HRESULT GetFontFamily
(IDWriteFontFamily
**family
);
748 DWRITE_FONT_WEIGHT GetWeight
();
749 DWRITE_FONT_STRETCH GetStretch
();
750 DWRITE_FONT_STYLE GetStyle
();
753 HRESULT GetFaceNames
(IDWriteLocalizedStrings
**names
);
754 HRESULT GetInformationalStrings
(
755 DWRITE_INFORMATIONAL_STRING_ID stringid
,
756 IDWriteLocalizedStrings
**strings
,
759 DWRITE_FONT_SIMULATIONS GetSimulations
();
760 void GetMetrics
(DWRITE_FONT_METRICS
*metrics
);
761 HRESULT HasCharacter
(UINT32 value
, BOOL
*exists
);
762 HRESULT CreateFontFace
(IDWriteFontFace
**face
);
768 uuid(1a0d8438
-1d97
-4ec1
-aef9
-a2fb86ed6acb
)
770 interface IDWriteFontList
: IUnknown
772 HRESULT GetFontCollection
(IDWriteFontCollection
**collection
);
773 UINT32 GetFontCount
();
774 HRESULT GetFont
(UINT32 index
, IDWriteFont
**font
);
780 uuid(da20d8ef
-812a
-4c43
-9802-62ec4abd7add
)
782 interface IDWriteFontFamily
: IDWriteFontList
784 HRESULT GetFamilyNames
(IDWriteLocalizedStrings
**names
);
786 HRESULT GetFirstMatchingFont
(
787 DWRITE_FONT_WEIGHT weight
,
788 DWRITE_FONT_STRETCH stretch
,
789 DWRITE_FONT_STYLE style
,
792 HRESULT GetMatchingFonts
(
793 DWRITE_FONT_WEIGHT weight
,
794 DWRITE_FONT_STRETCH stretch
,
795 DWRITE_FONT_STYLE style
,
796 IDWriteFontList
**fonts
);
802 uuid(a84cee02
-3eea
-4eee
-a827
-87c1a02a0fcc
)
804 interface IDWriteFontCollection
: IUnknown
806 UINT32 GetFontFamilyCount
();
807 HRESULT GetFontFamily
(UINT32 index
, IDWriteFontFamily
**family
);
808 HRESULT FindFamilyName
(WCHAR
const *name
, UINT32
*index
, BOOL
*exists
);
809 HRESULT GetFontFromFontFace
(IDWriteFontFace
*face
, IDWriteFont
**font
);
815 uuid(eaf3a2da
-ecf4
-4d24
-b644
-b34f6842024b
)
817 interface IDWritePixelSnapping
: IUnknown
819 HRESULT IsPixelSnappingDisabled
(
820 void *client_drawingcontext
,
823 HRESULT GetCurrentTransform
(
824 void *client_drawingcontext
,
825 DWRITE_MATRIX
*transform
);
827 HRESULT GetPixelsPerDip
(
828 void *client_drawingcontext
,
829 FLOAT *pixels_per_dip
);
835 uuid(ef8a8135
-5cc6
-45fe
-8825-c5a0724eb819
)
837 interface IDWriteTextRenderer
: IDWritePixelSnapping
839 HRESULT DrawGlyphRun
(
840 void* client_drawingcontext
,
841 FLOAT baselineOriginX
,
842 FLOAT baselineOriginY
,
843 DWRITE_MEASURING_MODE mode
,
844 DWRITE_GLYPH_RUN
const *glyph_run
,
845 DWRITE_GLYPH_RUN_DESCRIPTION
const *run_descr
,
846 IUnknown
*drawing_effect
);
848 HRESULT DrawUnderline
(
849 void *client_drawingcontext
,
850 FLOAT baselineOriginX
,
851 FLOAT baselineOriginY
,
852 DWRITE_UNDERLINE
const* underline
,
853 IUnknown
*drawing_effect
);
855 HRESULT DrawStrikethrough
(
856 void *client_drawingcontext
,
857 FLOAT baselineOriginX
,
858 FLOAT baselineOriginY
,
859 DWRITE_STRIKETHROUGH
const* strikethrough
,
860 IUnknown
*drawing_effect
);
862 HRESULT DrawInlineObject
(
863 void *client_drawingcontext
,
866 IDWriteInlineObject
*object,
869 IUnknown
*drawing_effect
);
875 uuid(8339fde3
-106f
-47ab
-8373-1c6295eb10b3
)
877 interface IDWriteInlineObject
: IUnknown
880 void* client_drawingontext
,
881 IDWriteTextRenderer
* renderer
,
886 IUnknown
*drawing_effect
);
888 HRESULT GetMetrics
(DWRITE_INLINE_OBJECT_METRICS
*metrics
);
889 HRESULT GetOverhangMetrics
(DWRITE_OVERHANG_METRICS
*overhangs
);
890 HRESULT GetBreakConditions
(
891 DWRITE_BREAK_CONDITION
* condition_before
,
892 DWRITE_BREAK_CONDITION
* condition_after
);
898 uuid(9c906818
-31d7
-4fd3
-a151
-7c5e225db55a
)
900 interface IDWriteTextFormat
: IUnknown
902 HRESULT SetTextAlignment
(DWRITE_TEXT_ALIGNMENT alignment
);
903 HRESULT SetParagraphAlignment
(DWRITE_PARAGRAPH_ALIGNMENT alignment
);
904 HRESULT SetWordWrapping
(DWRITE_WORD_WRAPPING wrapping
);
905 HRESULT SetReadingDirection
(DWRITE_READING_DIRECTION direction
);
906 HRESULT SetFlowDirection
(DWRITE_FLOW_DIRECTION direction
);
907 HRESULT SetIncrementalTabStop
(FLOAT tabstop
);
908 HRESULT SetTrimming
(DWRITE_TRIMMING
const *trimming
, IDWriteInlineObject
*trimming_sign
);
909 HRESULT SetLineSpacing
(DWRITE_LINE_SPACING_METHOD spacing
, FLOAT line_spacing
, FLOAT baseline
);
910 DWRITE_TEXT_ALIGNMENT GetTextAlignment
();
911 DWRITE_PARAGRAPH_ALIGNMENT GetParagraphAlignment
();
912 DWRITE_WORD_WRAPPING GetWordWrapping
();
913 DWRITE_READING_DIRECTION GetReadingDirection
();
914 DWRITE_FLOW_DIRECTION GetFlowDirection
();
915 FLOAT GetIncrementalTabStop
();
916 HRESULT GetTrimming
(DWRITE_TRIMMING
*options
, IDWriteInlineObject
**trimming_sign
);
918 HRESULT GetLineSpacing
(
919 DWRITE_LINE_SPACING_METHOD
*method
,
923 HRESULT GetFontCollection
(IDWriteFontCollection
**collection
);
924 UINT32 GetFontFamilyNameLength
();
925 HRESULT GetFontFamilyName
(WCHAR
*name
, UINT32 size
);
926 DWRITE_FONT_WEIGHT GetFontWeight
();
927 DWRITE_FONT_STYLE GetFontStyle
();
928 DWRITE_FONT_STRETCH GetFontStretch
();
930 UINT32 GetLocaleNameLength
();
931 HRESULT GetLocaleName
(WCHAR
*name
, UINT32 size
);
937 uuid(55f1112b
-1dc2
-4b3c
-9541-f46894ed85b6
)
939 interface IDWriteTypography
: IUnknown
941 HRESULT AddFontFeature
(DWRITE_FONT_FEATURE feature
);
942 UINT32 GetFontFeatureCount
();
943 HRESULT GetFontFeature
(UINT32 index
, DWRITE_FONT_FEATURE
*feature
);
949 uuid(5e5a32a3
-8dff
-4773-9ff6
-0696eab77267
)
951 interface IDWriteBitmapRenderTarget
: IUnknown
953 HRESULT DrawGlyphRun
(
954 FLOAT baselineOriginX
,
955 FLOAT baselineOriginY
,
956 DWRITE_MEASURING_MODE measuring_mode
,
957 DWRITE_GLYPH_RUN
const* glyph_run
,
958 IDWriteRenderingParams
* params
,
960 [defaultvalue(NULL
)] RECT
*blackbox_rect
);
963 FLOAT GetPixelsPerDip
();
964 HRESULT SetPixelsPerDip
(FLOAT pixels_per_dip
);
965 HRESULT GetCurrentTransform
(DWRITE_MATRIX
*transform
);
966 HRESULT SetCurrentTransform
(DWRITE_MATRIX
const *transform
);
967 HRESULT GetSize
(SIZE
*size
);
968 HRESULT Resize
(UINT32 width
, UINT32 height
);
971 cpp_quote
("#ifndef _WINGDI_")
972 /* already defined in wingdi.h but needed for WIDL */
973 #define LF_FACESIZE
32
975 typedef struct tagLOGFONTW
987 BYTE lfClipPrecision
;
989 BYTE lfPitchAndFamily
;
990 WCHAR lfFaceName
[LF_FACESIZE
];
991 } LOGFONTW
, *PLOGFONTW
, *LPLOGFONTW
;
992 cpp_quote
("#endif /* _WINGDI_ */")
997 uuid(1edd9491
-9853-4299-898f
-6432983b6f3a
)
999 interface IDWriteGdiInterop
: IUnknown
1001 HRESULT CreateFontFromLOGFONT
(LOGFONTW
const *logfont
, IDWriteFont
**font
);
1002 HRESULT ConvertFontToLOGFONT
(
1005 BOOL
*is_systemfont
);
1007 HRESULT ConvertFontFaceToLOGFONT
(IDWriteFontFace
* font
, LOGFONTW
* logfont
);
1008 HRESULT CreateFontFaceFromHdc
(HDC hdc
, IDWriteFontFace
**fontface
);
1009 HRESULT CreateBitmapRenderTarget
(HDC hdc
, UINT32 width
, UINT32 height
, IDWriteBitmapRenderTarget
**target
);
1015 uuid(53737037-6d14
-410b
-9bfe
-0b182bb70961
)
1017 interface IDWriteTextLayout
: IDWriteTextFormat
1019 HRESULT SetMaxWidth
(FLOAT maxWidth
);
1020 HRESULT SetMaxHeight
(FLOAT maxHeight
);
1021 HRESULT SetFontCollection
(IDWriteFontCollection
* collection
, DWRITE_TEXT_RANGE
range);
1022 HRESULT SetFontFamilyName
(WCHAR
const *name
, DWRITE_TEXT_RANGE
range);
1023 HRESULT SetFontWeight
(DWRITE_FONT_WEIGHT weight
, DWRITE_TEXT_RANGE
range);
1024 HRESULT SetFontStyle
(DWRITE_FONT_STYLE style
, DWRITE_TEXT_RANGE
range);
1025 HRESULT SetFontStretch
(DWRITE_FONT_STRETCH stretch
, DWRITE_TEXT_RANGE
range);
1026 HRESULT SetFontSize
(FLOAT size
, DWRITE_TEXT_RANGE
range);
1027 HRESULT SetUnderline
(BOOL underline
, DWRITE_TEXT_RANGE
range);
1028 HRESULT SetStrikethrough
(BOOL strikethrough
, DWRITE_TEXT_RANGE
range);
1029 HRESULT SetDrawingEffect
(IUnknown
* effect
, DWRITE_TEXT_RANGE
range);
1030 HRESULT SetInlineObject
(IDWriteInlineObject
*object, DWRITE_TEXT_RANGE
range);
1031 HRESULT SetTypography
(IDWriteTypography
* typography
, DWRITE_TEXT_RANGE
range);
1032 HRESULT SetLocaleName
(WCHAR
const* locale
, DWRITE_TEXT_RANGE
range);
1034 FLOAT GetMaxWidth
();
1035 FLOAT GetMaxHeight
();
1036 HRESULT GetFontCollection
(
1038 IDWriteFontCollection
** collection
,
1039 [defaultvalue(NULL
)] DWRITE_TEXT_RANGE
*range);
1041 HRESULT GetFontFamilyNameLength
(
1044 [defaultvalue(NULL
)] DWRITE_TEXT_RANGE
*range);
1046 HRESULT GetFontFamilyName
(
1050 [defaultvalue(NULL
)] DWRITE_TEXT_RANGE
*range);
1052 HRESULT GetFontWeight
(
1054 DWRITE_FONT_WEIGHT
*weight
,
1055 [defaultvalue(NULL
)] DWRITE_TEXT_RANGE
*range);
1057 HRESULT GetFontStyle
(
1058 UINT32 currentPosition
,
1059 DWRITE_FONT_STYLE
*style
,
1060 [defaultvalue(NULL
)] DWRITE_TEXT_RANGE
*range);
1062 HRESULT GetFontStretch
(
1064 DWRITE_FONT_STRETCH
*stretch
,
1065 [defaultvalue(NULL
)] DWRITE_TEXT_RANGE
*range);
1067 HRESULT GetFontSize
(
1070 [defaultvalue(NULL
)] DWRITE_TEXT_RANGE
*range);
1072 HRESULT GetUnderline
(
1074 BOOL
*has_underline
,
1075 [defaultvalue(NULL
)] DWRITE_TEXT_RANGE
*range);
1077 HRESULT GetStrikethrough
(
1079 BOOL
*has_strikethrough
,
1080 [defaultvalue(NULL
)] DWRITE_TEXT_RANGE
*range);
1082 HRESULT GetDrawingEffect
(
1085 [defaultvalue(NULL
)] DWRITE_TEXT_RANGE
*range);
1087 HRESULT GetInlineObject
(
1089 IDWriteInlineObject
**object,
1090 [defaultvalue(NULL
)] DWRITE_TEXT_RANGE
*range);
1092 HRESULT GetTypography
(
1094 IDWriteTypography
** typography
,
1095 [defaultvalue(NULL
)] DWRITE_TEXT_RANGE
*range);
1097 HRESULT GetLocaleNameLength
(
1100 [defaultvalue(NULL
)] DWRITE_TEXT_RANGE
*range);
1102 HRESULT GetLocaleName
(
1106 [defaultvalue(NULL
)] DWRITE_TEXT_RANGE
*range);
1110 IDWriteTextRenderer
* renderer
,
1114 HRESULT GetLineMetrics
(
1115 DWRITE_LINE_METRICS
*metrics
,
1117 UINT32
*actual_count
);
1119 HRESULT GetMetrics
(DWRITE_TEXT_METRICS
*metrics
);
1120 HRESULT GetOverhangMetrics
(DWRITE_OVERHANG_METRICS
*overhangs
);
1121 HRESULT GetClusterMetrics
(
1122 DWRITE_CLUSTER_METRICS
*metrics
,
1126 HRESULT DetermineMinWidth
(FLOAT* min_width
);
1127 HRESULT HitTestPoint
(
1130 BOOL
* is_trailinghit
,
1132 DWRITE_HIT_TEST_METRICS
*metrics
);
1134 HRESULT HitTestTextPosition
(
1135 UINT32 textPosition
,
1136 BOOL is_trailinghit
,
1139 DWRITE_HIT_TEST_METRICS
*metrics
);
1141 HRESULT HitTestTextRange
(
1142 UINT32 textPosition
,
1146 DWRITE_HIT_TEST_METRICS
*metrics
,
1147 UINT32 max_metricscount
,
1148 UINT32
* actual_metricscount
);
1154 uuid(14885cc9
-bab0
-4f90
-b6ed
-5c366a2cd03d
)
1156 interface IDWriteNumberSubstitution
: IUnknown
1163 uuid(688e1a58
-5094-47c8
-adc8
-fbcea60ae92b
)
1165 interface IDWriteTextAnalysisSource
: IUnknown
1167 HRESULT GetTextAtPosition
(
1172 HRESULT GetTextBeforePosition
(
1177 DWRITE_READING_DIRECTION GetParagraphReadingDirection
();
1178 HRESULT GetLocaleName
(
1181 WCHAR
const** locale
);
1183 HRESULT GetNumberSubstitution
(
1186 IDWriteNumberSubstitution
**substitution
);
1192 uuid(5810cd44
-0ca0
-4701-b3fa
-bec5182ae4f6
)
1194 interface IDWriteTextAnalysisSink
: IUnknown
1196 HRESULT SetScriptAnalysis
(
1199 DWRITE_SCRIPT_ANALYSIS
const* scriptanalysis
);
1201 HRESULT SetLineBreakpoints
(
1204 DWRITE_LINE_BREAKPOINT
const* breakpoints
);
1206 HRESULT SetBidiLevel
(
1209 UINT8 explicitLevel
,
1210 UINT8 resolvedLevel
);
1212 HRESULT SetNumberSubstitution
(
1215 IDWriteNumberSubstitution
* substitution
);
1221 uuid(b7e6163e
-7f46
-43b4
-84b3
-e4e6249c365d
)
1223 interface IDWriteTextAnalyzer
: IUnknown
1225 HRESULT AnalyzeScript
(
1226 IDWriteTextAnalysisSource
* source,
1229 IDWriteTextAnalysisSink
* sink
);
1231 HRESULT AnalyzeBidi
(
1232 IDWriteTextAnalysisSource
* source,
1235 IDWriteTextAnalysisSink
* sink
);
1237 HRESULT AnalyzeNumberSubstitution
(
1238 IDWriteTextAnalysisSource
* source,
1241 IDWriteTextAnalysisSink
* sink
);
1243 HRESULT AnalyzeLineBreakpoints
(
1244 IDWriteTextAnalysisSource
* source,
1247 IDWriteTextAnalysisSink
* sink
);
1252 IDWriteFontFace
* font_face
,
1255 DWRITE_SCRIPT_ANALYSIS
const* analysis
,
1256 WCHAR
const* locale
,
1257 IDWriteNumberSubstitution
* substitution
,
1258 DWRITE_TYPOGRAPHIC_FEATURES
const** features
,
1259 UINT32
const* feature_range_len
,
1260 UINT32 feature_ranges
,
1261 UINT32 max_glyph_count
,
1263 DWRITE_SHAPING_TEXT_PROPERTIES
* text_props
,
1264 UINT16
* glyph_indices
,
1265 DWRITE_SHAPING_GLYPH_PROPERTIES
* glyph_props
,
1266 UINT32
* actual_glyph_count
);
1268 HRESULT GetGlyphPlacements
(
1270 UINT16
const* clustermap
,
1271 DWRITE_SHAPING_TEXT_PROPERTIES
* props
,
1273 UINT16
const* glyph_indices
,
1274 DWRITE_SHAPING_GLYPH_PROPERTIES
const* glyph_props
,
1276 IDWriteFontFace
* font_face
,
1280 DWRITE_SCRIPT_ANALYSIS
const* analysis
,
1281 WCHAR
const* locale
,
1282 DWRITE_TYPOGRAPHIC_FEATURES
const** features
,
1283 UINT32
const* feature_range_len
,
1284 UINT32 feature_ranges
,
1285 FLOAT* glyph_advances
,
1286 DWRITE_GLYPH_OFFSET
* glyph_offsets
);
1288 HRESULT GetGdiCompatibleGlyphPlacements
(
1290 UINT16
const* clustermap
,
1291 DWRITE_SHAPING_TEXT_PROPERTIES
* props
,
1293 UINT16
const* glyph_indices
,
1294 DWRITE_SHAPING_GLYPH_PROPERTIES
const* glyph_props
,
1296 IDWriteFontFace
* font_face
,
1298 FLOAT pixels_per_dip
,
1299 DWRITE_MATRIX
const* transform
,
1300 BOOL use_gdi_natural
,
1303 DWRITE_SCRIPT_ANALYSIS
const* analysis
,
1304 WCHAR
const* locale
,
1305 DWRITE_TYPOGRAPHIC_FEATURES
const** features
,
1306 UINT32
const* feature_range_lengths
,
1307 UINT32 feature_ranges
,
1308 FLOAT* glyph_advances
,
1309 DWRITE_GLYPH_OFFSET
* glyph_offsets
);
1315 uuid(7d97dbf7
-e085
-42d4
-81e3
-6a883bded118
)
1317 interface IDWriteGlyphRunAnalysis
: IUnknown
1319 HRESULT GetAlphaTextureBounds
(DWRITE_TEXTURE_TYPE type
, RECT
* bounds
);
1320 HRESULT CreateAlphaTexture
(DWRITE_TEXTURE_TYPE type
, RECT
const* bounds
, BYTE* alphaValues
, UINT32 bufferSize
);
1321 HRESULT GetAlphaBlendParams
(
1322 IDWriteRenderingParams
* renderingParams
,
1324 FLOAT* blendEnhancedContrast
,
1325 FLOAT* blendClearTypeLevel
);
1331 uuid(b859ee5a
-d838
-4b5b
-a2e8
-1adc7d93db48
)
1333 interface IDWriteFactory
: IUnknown
1335 HRESULT GetSystemFontCollection
(IDWriteFontCollection
**collection
,
1336 [defaultvalue(FALSE
)] BOOL check_for_updates
);
1338 HRESULT CreateCustomFontCollection
(
1339 IDWriteFontCollectionLoader
*loader
,
1342 IDWriteFontCollection
**collection
);
1344 HRESULT RegisterFontCollectionLoader
(IDWriteFontCollectionLoader
*loader
);
1346 HRESULT UnregisterFontCollectionLoader
(IDWriteFontCollectionLoader
*loader
);
1348 HRESULT CreateFontFileReference
(
1350 FILETIME
const *writetime
,
1351 IDWriteFontFile
**font_file
);
1353 HRESULT CreateCustomFontFileReference
(
1354 void const *reference_key
,
1356 IDWriteFontFileLoader
*loader
,
1357 IDWriteFontFile
**font_file
);
1359 HRESULT CreateFontFace
(
1360 DWRITE_FONT_FACE_TYPE facetype
,
1361 UINT32 files_number
,
1362 IDWriteFontFile
* const* font_files
,
1364 DWRITE_FONT_SIMULATIONS sim_flags
,
1365 IDWriteFontFace
**font_face
);
1367 HRESULT CreateRenderingParams
(IDWriteRenderingParams
**params
);
1369 HRESULT CreateMonitorRenderingParams
(
1371 IDWriteRenderingParams
**params
);
1373 HRESULT CreateCustomRenderingParams
(
1375 FLOAT enhancedContrast
,
1376 FLOAT cleartype_level
,
1377 DWRITE_PIXEL_GEOMETRY geometry
,
1378 DWRITE_RENDERING_MODE mode
,
1379 IDWriteRenderingParams
**params
);
1381 HRESULT RegisterFontFileLoader
(IDWriteFontFileLoader
*loader
);
1383 HRESULT UnregisterFontFileLoader
(IDWriteFontFileLoader
*loader
);
1385 HRESULT CreateTextFormat
(
1386 WCHAR
const* family_name
,
1387 IDWriteFontCollection
*collection
,
1388 DWRITE_FONT_WEIGHT weight
,
1389 DWRITE_FONT_STYLE style
,
1390 DWRITE_FONT_STRETCH stretch
,
1392 WCHAR
const *locale
,
1393 IDWriteTextFormat
**format
);
1395 HRESULT CreateTypography
(IDWriteTypography
**typography
);
1397 HRESULT GetGdiInterop
(IDWriteGdiInterop
**gdi_interop
);
1399 HRESULT CreateTextLayout
(
1400 WCHAR
const* string,
1402 IDWriteTextFormat
*format
,
1405 IDWriteTextLayout
**layout
);
1407 HRESULT CreateGdiCompatibleTextLayout
(
1408 WCHAR
const* string,
1410 IDWriteTextFormat
*format
,
1412 FLOAT layout_height
,
1413 FLOAT pixels_per_dip
,
1414 DWRITE_MATRIX
const* transform
,
1415 BOOL use_gdi_natural
,
1416 IDWriteTextLayout
**layout
);
1418 HRESULT CreateEllipsisTrimmingSign
(
1419 IDWriteTextFormat
*format
,
1420 IDWriteInlineObject
**trimming_sign
);
1422 HRESULT CreateTextAnalyzer
(IDWriteTextAnalyzer
**analyzer
);
1424 HRESULT CreateNumberSubstitution
(
1425 DWRITE_NUMBER_SUBSTITUTION_METHOD method
,
1426 WCHAR
const* locale
,
1427 BOOL ignore_user_override
,
1428 IDWriteNumberSubstitution
**substitution
);
1430 HRESULT CreateGlyphRunAnalysis
(
1431 DWRITE_GLYPH_RUN
const *glyph_run
,
1432 FLOAT pixels_per_dip
,
1433 DWRITE_MATRIX
const* transform
,
1434 DWRITE_RENDERING_MODE rendering_mode
,
1435 DWRITE_MEASURING_MODE measuring_mode
,
1438 IDWriteGlyphRunAnalysis
**analysis
);
1441 cpp_quote
("HRESULT WINAPI DWriteCreateFactory(DWRITE_FACTORY_TYPE,REFIID,IUnknown**);")
1444 cpp_quote
("#define FACILITY_DWRITE 0x898")
1445 cpp_quote
("#define DWRITE_ERR_BASE 0x5000")
1446 cpp_quote
("#define MAKE_DWRITE_HR(severity, code) MAKE_HRESULT(severity, FACILITY_DWRITE, (DWRITE_ERR_BASE + code))")
1447 cpp_quote
("#define MAKE_DWRITE_HR_ERR(code) MAKE_DWRITE_HR(SEVERITY_ERROR, code)")