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_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
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
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_TYPOGRAPHIC_FAMILY_NAMES
,
131 DWRITE_INFORMATIONAL_STRING_TYPOGRAPHIC_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_WEIGHT_STRETCH_STYLE_FAMILY_NAME
,
137 DWRITE_INFORMATIONAL_STRING_DESIGN_SCRIPT_LANGUAGE_TAG
,
138 DWRITE_INFORMATIONAL_STRING_SUPPORTED_SCRIPT_LANGUAGE_TAG
,
139 DWRITE_INFORMATIONAL_STRING_PREFERRED_FAMILY_NAMES
= DWRITE_INFORMATIONAL_STRING_TYPOGRAPHIC_FAMILY_NAMES
,
140 DWRITE_INFORMATIONAL_STRING_PREFERRED_SUBFAMILY_NAMES
= DWRITE_INFORMATIONAL_STRING_TYPOGRAPHIC_SUBFAMILY_NAMES
,
141 DWRITE_INFORMATIONAL_STRING_WWS_FAMILY_NAME
= DWRITE_INFORMATIONAL_STRING_WEIGHT_STRETCH_STYLE_FAMILY_NAME
,
142 } DWRITE_INFORMATIONAL_STRING_ID
;
144 typedef enum DWRITE_FONT_SIMULATIONS
146 DWRITE_FONT_SIMULATIONS_NONE
,
147 DWRITE_FONT_SIMULATIONS_BOLD
,
148 DWRITE_FONT_SIMULATIONS_OBLIQUE
149 } DWRITE_FONT_SIMULATIONS
;
150 cpp_quote
("DEFINE_ENUM_FLAG_OPERATORS(DWRITE_FONT_SIMULATIONS);")
152 typedef enum DWRITE_PIXEL_GEOMETRY
154 DWRITE_PIXEL_GEOMETRY_FLAT
,
155 DWRITE_PIXEL_GEOMETRY_RGB
,
156 DWRITE_PIXEL_GEOMETRY_BGR
157 } DWRITE_PIXEL_GEOMETRY
;
159 typedef enum DWRITE_RENDERING_MODE
161 DWRITE_RENDERING_MODE_DEFAULT
,
162 DWRITE_RENDERING_MODE_ALIASED
,
163 DWRITE_RENDERING_MODE_GDI_CLASSIC
,
164 DWRITE_RENDERING_MODE_GDI_NATURAL
,
165 DWRITE_RENDERING_MODE_NATURAL
,
166 DWRITE_RENDERING_MODE_NATURAL_SYMMETRIC
,
167 DWRITE_RENDERING_MODE_OUTLINE
,
168 DWRITE_RENDERING_MODE_CLEARTYPE_GDI_CLASSIC
= DWRITE_RENDERING_MODE_GDI_CLASSIC
,
169 DWRITE_RENDERING_MODE_CLEARTYPE_GDI_NATURAL
= DWRITE_RENDERING_MODE_GDI_NATURAL
,
170 DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL
= DWRITE_RENDERING_MODE_NATURAL
,
171 DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL_SYMMETRIC
= DWRITE_RENDERING_MODE_NATURAL_SYMMETRIC
172 } DWRITE_RENDERING_MODE
;
174 typedef enum DWRITE_TEXT_ALIGNMENT
176 DWRITE_TEXT_ALIGNMENT_LEADING
,
177 DWRITE_TEXT_ALIGNMENT_TRAILING
,
178 DWRITE_TEXT_ALIGNMENT_CENTER
,
179 DWRITE_TEXT_ALIGNMENT_JUSTIFIED
180 } DWRITE_TEXT_ALIGNMENT
;
182 typedef enum DWRITE_PARAGRAPH_ALIGNMENT
184 DWRITE_PARAGRAPH_ALIGNMENT_NEAR
,
185 DWRITE_PARAGRAPH_ALIGNMENT_FAR
,
186 DWRITE_PARAGRAPH_ALIGNMENT_CENTER
187 } DWRITE_PARAGRAPH_ALIGNMENT
;
189 typedef enum DWRITE_WORD_WRAPPING
191 DWRITE_WORD_WRAPPING_WRAP
,
192 DWRITE_WORD_WRAPPING_NO_WRAP
,
193 DWRITE_WORD_WRAPPING_EMERGENCY_BREAK
,
194 DWRITE_WORD_WRAPPING_WHOLE_WORD
,
195 DWRITE_WORD_WRAPPING_CHARACTER
196 } DWRITE_WORD_WRAPPING
;
198 typedef enum DWRITE_READING_DIRECTION
200 DWRITE_READING_DIRECTION_LEFT_TO_RIGHT
,
201 DWRITE_READING_DIRECTION_RIGHT_TO_LEFT
,
202 DWRITE_READING_DIRECTION_TOP_TO_BOTTOM
,
203 DWRITE_READING_DIRECTION_BOTTOM_TO_TOP
204 } DWRITE_READING_DIRECTION
;
206 typedef enum DWRITE_FLOW_DIRECTION
208 DWRITE_FLOW_DIRECTION_TOP_TO_BOTTOM
,
209 DWRITE_FLOW_DIRECTION_BOTTOM_TO_TOP
,
210 DWRITE_FLOW_DIRECTION_LEFT_TO_RIGHT
,
211 DWRITE_FLOW_DIRECTION_RIGHT_TO_LEFT
212 } DWRITE_FLOW_DIRECTION
;
214 typedef enum DWRITE_TRIMMING_GRANULARITY
216 DWRITE_TRIMMING_GRANULARITY_NONE
,
217 DWRITE_TRIMMING_GRANULARITY_CHARACTER
,
218 DWRITE_TRIMMING_GRANULARITY_WORD
219 } DWRITE_TRIMMING_GRANULARITY
;
221 typedef enum DWRITE_BREAK_CONDITION
223 DWRITE_BREAK_CONDITION_NEUTRAL
,
224 DWRITE_BREAK_CONDITION_CAN_BREAK
,
225 DWRITE_BREAK_CONDITION_MAY_NOT_BREAK
,
226 DWRITE_BREAK_CONDITION_MUST_BREAK
227 } DWRITE_BREAK_CONDITION
;
229 typedef enum DWRITE_LINE_SPACING_METHOD
231 DWRITE_LINE_SPACING_METHOD_DEFAULT
,
232 DWRITE_LINE_SPACING_METHOD_UNIFORM
,
233 DWRITE_LINE_SPACING_METHOD_PROPORTIONAL
234 } DWRITE_LINE_SPACING_METHOD
;
236 cpp_quote
("#define DWRITE_MAKE_OPENTYPE_TAG(a,b,c,d) ( \\")
237 cpp_quote
(" ((UINT32)(UINT8)(d) << 24) | \\")
238 cpp_quote
(" ((UINT32)(UINT8)(c) << 16) | \\")
239 cpp_quote
(" ((UINT32)(UINT8)(b) << 8) | \\")
240 cpp_quote
(" (UINT32)(UINT8)(a))")
242 typedef enum DWRITE_FONT_FEATURE_TAG
244 DWRITE_FONT_FEATURE_TAG_ALTERNATIVE_FRACTIONS
= 0x63726661, /* 'afrc' */
245 DWRITE_FONT_FEATURE_TAG_PETITE_CAPITALS_FROM_CAPITALS
= 0x63703263, /* 'c2pc' */
246 DWRITE_FONT_FEATURE_TAG_SMALL_CAPITALS_FROM_CAPITALS
= 0x63733263, /* 'c2sc' */
247 DWRITE_FONT_FEATURE_TAG_CONTEXTUAL_ALTERNATES
= 0x746c6163, /* 'calt' */
248 DWRITE_FONT_FEATURE_TAG_CASE_SENSITIVE_FORMS
= 0x65736163, /* 'case' */
249 DWRITE_FONT_FEATURE_TAG_GLYPH_COMPOSITION_DECOMPOSITION
= 0x706d6363, /* 'ccmp' */
250 DWRITE_FONT_FEATURE_TAG_CONTEXTUAL_LIGATURES
= 0x67696c63, /* 'clig' */
251 DWRITE_FONT_FEATURE_TAG_CAPITAL_SPACING
= 0x70737063, /* 'cpsp' */
252 DWRITE_FONT_FEATURE_TAG_CONTEXTUAL_SWASH
= 0x68777363, /* 'cswh' */
253 DWRITE_FONT_FEATURE_TAG_CURSIVE_POSITIONING
= 0x73727563, /* 'curs' */
254 DWRITE_FONT_FEATURE_TAG_DEFAULT
= 0x746c6664, /* 'dflt' */
255 DWRITE_FONT_FEATURE_TAG_DISCRETIONARY_LIGATURES
= 0x67696c64, /* 'dlig' */
256 DWRITE_FONT_FEATURE_TAG_EXPERT_FORMS
= 0x74707865, /* 'expt' */
257 DWRITE_FONT_FEATURE_TAG_FRACTIONS
= 0x63617266, /* 'frac' */
258 DWRITE_FONT_FEATURE_TAG_FULL_WIDTH
= 0x64697766, /* 'fwid' */
259 DWRITE_FONT_FEATURE_TAG_HALF_FORMS
= 0x666c6168, /* 'half' */
260 DWRITE_FONT_FEATURE_TAG_HALANT_FORMS
= 0x6e6c6168, /* 'haln' */
261 DWRITE_FONT_FEATURE_TAG_ALTERNATE_HALF_WIDTH
= 0x746c6168, /* 'halt' */
262 DWRITE_FONT_FEATURE_TAG_HISTORICAL_FORMS
= 0x74736968, /* 'hist' */
263 DWRITE_FONT_FEATURE_TAG_HORIZONTAL_KANA_ALTERNATES
= 0x616e6b68, /* 'hkna' */
264 DWRITE_FONT_FEATURE_TAG_HISTORICAL_LIGATURES
= 0x67696c68, /* 'hlig' */
265 DWRITE_FONT_FEATURE_TAG_HALF_WIDTH
= 0x64697768, /* 'hwid' */
266 DWRITE_FONT_FEATURE_TAG_HOJO_KANJI_FORMS
= 0x6f6a6f68, /* 'hojo' */
267 DWRITE_FONT_FEATURE_TAG_JIS04_FORMS
= 0x3430706a, /* 'jp04' */
268 DWRITE_FONT_FEATURE_TAG_JIS78_FORMS
= 0x3837706a, /* 'jp78' */
269 DWRITE_FONT_FEATURE_TAG_JIS83_FORMS
= 0x3338706a, /* 'jp83' */
270 DWRITE_FONT_FEATURE_TAG_JIS90_FORMS
= 0x3039706a, /* 'jp90' */
271 DWRITE_FONT_FEATURE_TAG_KERNING
= 0x6e72656b, /* 'kern' */
272 DWRITE_FONT_FEATURE_TAG_STANDARD_LIGATURES
= 0x6167696c, /* 'liga' */
273 DWRITE_FONT_FEATURE_TAG_LINING_FIGURES
= 0x6d756e6c, /* 'lnum' */
274 DWRITE_FONT_FEATURE_TAG_LOCALIZED_FORMS
= 0x6c636f6c, /* 'locl' */
275 DWRITE_FONT_FEATURE_TAG_MARK_POSITIONING
= 0x6b72616d, /* 'mark' */
276 DWRITE_FONT_FEATURE_TAG_MATHEMATICAL_GREEK
= 0x6b72676d, /* 'mgrk' */
277 DWRITE_FONT_FEATURE_TAG_MARK_TO_MARK_POSITIONING
= 0x6b6d6b6d, /* 'mkmk' */
278 DWRITE_FONT_FEATURE_TAG_ALTERNATE_ANNOTATION_FORMS
= 0x746c616e, /* 'nalt' */
279 DWRITE_FONT_FEATURE_TAG_NLC_KANJI_FORMS
= 0x6b636c6e, /* 'nlck' */
280 DWRITE_FONT_FEATURE_TAG_OLD_STYLE_FIGURES
= 0x6d756e6f, /* 'onum' */
281 DWRITE_FONT_FEATURE_TAG_ORDINALS
= 0x6e64726f, /* 'ordn' */
282 DWRITE_FONT_FEATURE_TAG_PROPORTIONAL_ALTERNATE_WIDTH
= 0x746c6170, /* 'palt' */
283 DWRITE_FONT_FEATURE_TAG_PETITE_CAPITALS
= 0x70616370, /* 'pcap' */
284 DWRITE_FONT_FEATURE_TAG_PROPORTIONAL_FIGURES
= 0x6d756e70, /* 'pnum' */
285 DWRITE_FONT_FEATURE_TAG_PROPORTIONAL_WIDTHS
= 0x64697770, /* 'pwid' */
286 DWRITE_FONT_FEATURE_TAG_QUARTER_WIDTHS
= 0x64697771, /* 'qwid' */
287 DWRITE_FONT_FEATURE_TAG_REQUIRED_LIGATURES
= 0x67696c72, /* 'rlig' */
288 DWRITE_FONT_FEATURE_TAG_RUBY_NOTATION_FORMS
= 0x79627572, /* 'ruby' */
289 DWRITE_FONT_FEATURE_TAG_STYLISTIC_ALTERNATES
= 0x746c6173, /* 'salt' */
290 DWRITE_FONT_FEATURE_TAG_SCIENTIFIC_INFERIORS
= 0x666e6973, /* 'sinf' */
291 DWRITE_FONT_FEATURE_TAG_SMALL_CAPITALS
= 0x70636d73, /* 'smcp' */
292 DWRITE_FONT_FEATURE_TAG_SIMPLIFIED_FORMS
= 0x6c706d73, /* 'smpl' */
293 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_1
= 0x31307373, /* 'ss01' */
294 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_2
= 0x32307373, /* 'ss02' */
295 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_3
= 0x33307373, /* 'ss03' */
296 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_4
= 0x34307373, /* 'ss04' */
297 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_5
= 0x35307373, /* 'ss05' */
298 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_6
= 0x36307373, /* 'ss06' */
299 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_7
= 0x37307373, /* 'ss07' */
300 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_8
= 0x38307373, /* 'ss08' */
301 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_9
= 0x39307373, /* 'ss09' */
302 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_10
= 0x30317373, /* 'ss10' */
303 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_11
= 0x31317373, /* 'ss11' */
304 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_12
= 0x32317373, /* 'ss12' */
305 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_13
= 0x33317373, /* 'ss13' */
306 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_14
= 0x34317373, /* 'ss14' */
307 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_15
= 0x35317373, /* 'ss15' */
308 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_16
= 0x36317373, /* 'ss16' */
309 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_17
= 0x37317373, /* 'ss17' */
310 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_18
= 0x38317373, /* 'ss18' */
311 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_19
= 0x39317373, /* 'ss19' */
312 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_20
= 0x30327373, /* 'ss20' */
313 DWRITE_FONT_FEATURE_TAG_SUBSCRIPT
= 0x73627573, /* 'subs' */
314 DWRITE_FONT_FEATURE_TAG_SUPERSCRIPT
= 0x73707573, /* 'sups' */
315 DWRITE_FONT_FEATURE_TAG_SWASH
= 0x68737773, /* 'swsh' */
316 DWRITE_FONT_FEATURE_TAG_TITLING
= 0x6c746974, /* 'titl' */
317 DWRITE_FONT_FEATURE_TAG_TRADITIONAL_NAME_FORMS
= 0x6d616e74, /* 'tnam' */
318 DWRITE_FONT_FEATURE_TAG_TABULAR_FIGURES
= 0x6d756e74, /* 'tnum' */
319 DWRITE_FONT_FEATURE_TAG_TRADITIONAL_FORMS
= 0x64617274, /* 'trad' */
320 DWRITE_FONT_FEATURE_TAG_THIRD_WIDTHS
= 0x64697774, /* 'twid' */
321 DWRITE_FONT_FEATURE_TAG_UNICASE
= 0x63696e75, /* 'unic' */
322 DWRITE_FONT_FEATURE_TAG_VERTICAL_WRITING
= 0x74726576, /* 'vert' */
323 DWRITE_FONT_FEATURE_TAG_VERTICAL_ALTERNATES_AND_ROTATION
= 0x32747276, /* 'vrt2' */
324 DWRITE_FONT_FEATURE_TAG_SLASHED_ZERO
= 0x6f72657a, /* 'zero' */
325 } DWRITE_FONT_FEATURE_TAG
;
327 typedef enum DWRITE_SCRIPT_SHAPES
329 DWRITE_SCRIPT_SHAPES_DEFAULT
= 0,
330 DWRITE_SCRIPT_SHAPES_NO_VISUAL
= 1
331 } DWRITE_SCRIPT_SHAPES
;
332 cpp_quote
("DEFINE_ENUM_FLAG_OPERATORS(DWRITE_SCRIPT_SHAPES);")
334 typedef enum DWRITE_NUMBER_SUBSTITUTION_METHOD
336 DWRITE_NUMBER_SUBSTITUTION_METHOD_FROM_CULTURE
,
337 DWRITE_NUMBER_SUBSTITUTION_METHOD_CONTEXTUAL
,
338 DWRITE_NUMBER_SUBSTITUTION_METHOD_NONE
,
339 DWRITE_NUMBER_SUBSTITUTION_METHOD_NATIONAL
,
340 DWRITE_NUMBER_SUBSTITUTION_METHOD_TRADITIONAL
341 } DWRITE_NUMBER_SUBSTITUTION_METHOD
;
343 cpp_quote
("#define DWRITE_ALPHA_MAX 255")
345 typedef enum DWRITE_TEXTURE_TYPE
347 DWRITE_TEXTURE_ALIASED_1x1
,
348 DWRITE_TEXTURE_CLEARTYPE_3x1
349 } DWRITE_TEXTURE_TYPE
;
351 typedef struct DWRITE_FONT_METRICS
353 UINT16 designUnitsPerEm
;
359 INT16 underlinePosition
;
360 UINT16 underlineThickness
;
361 INT16 strikethroughPosition
;
362 UINT16 strikethroughThickness
;
363 } DWRITE_FONT_METRICS
;
365 typedef struct DWRITE_GLYPH_METRICS
367 INT32 leftSideBearing
;
369 INT32 rightSideBearing
;
370 INT32 topSideBearing
;
371 UINT32 advanceHeight
;
372 INT32 bottomSideBearing
;
373 INT32 verticalOriginY
;
374 } DWRITE_GLYPH_METRICS
;
376 typedef struct DWRITE_GLYPH_OFFSET
379 FLOAT ascenderOffset
;
380 } DWRITE_GLYPH_OFFSET
;
382 typedef struct DWRITE_MATRIX
392 typedef struct DWRITE_TRIMMING
394 DWRITE_TRIMMING_GRANULARITY granularity
;
396 UINT32 delimiterCount
;
399 cpp_quote
("#ifndef __d2d1_h__")
400 typedef struct DWRITE_GLYPH_RUN DWRITE_GLYPH_RUN
;
401 cpp_quote
("#endif /* __d2d1_h__ */")
403 struct DWRITE_GLYPH_RUN
405 IDWriteFontFace
* fontFace
;
408 UINT16
const* glyphIndices
;
409 FLOAT const* glyphAdvances
;
410 DWRITE_GLYPH_OFFSET
const* glyphOffsets
;
415 cpp_quote
("#ifndef __d2d1_1_h__")
416 typedef struct DWRITE_GLYPH_RUN_DESCRIPTION DWRITE_GLYPH_RUN_DESCRIPTION
;
417 cpp_quote
("#endif /* __d2d1_1_h__ */")
419 struct DWRITE_GLYPH_RUN_DESCRIPTION
421 WCHAR
const* localeName
;
424 UINT16
const* clusterMap
;
428 typedef struct DWRITE_UNDERLINE
434 DWRITE_READING_DIRECTION readingDirection
;
435 DWRITE_FLOW_DIRECTION flowDirection
;
436 WCHAR
const* localeName
;
437 DWRITE_MEASURING_MODE measuringMode
;
440 typedef struct DWRITE_STRIKETHROUGH
445 DWRITE_READING_DIRECTION readingDirection
;
446 DWRITE_FLOW_DIRECTION flowDirection
;
447 WCHAR
const* localeName
;
448 DWRITE_MEASURING_MODE measuringMode
;
449 } DWRITE_STRIKETHROUGH
;
451 typedef struct DWRITE_INLINE_OBJECT_METRICS
456 BOOL supportsSideways
;
457 } DWRITE_INLINE_OBJECT_METRICS
;
459 typedef struct DWRITE_OVERHANG_METRICS
465 } DWRITE_OVERHANG_METRICS
;
467 typedef struct DWRITE_FONT_FEATURE
469 DWRITE_FONT_FEATURE_TAG nameTag
;
471 } DWRITE_FONT_FEATURE
;
473 typedef struct DWRITE_TEXT_RANGE
475 UINT32 startPosition
;
479 typedef struct DWRITE_LINE_METRICS
482 UINT32 trailingWhitespaceLength
;
483 UINT32 newlineLength
;
487 } DWRITE_LINE_METRICS
;
489 typedef struct DWRITE_TEXT_METRICS
494 FLOAT widthIncludingTrailingWhitespace
;
498 UINT32 maxBidiReorderingDepth
;
500 } DWRITE_TEXT_METRICS
;
502 typedef struct DWRITE_CLUSTER_METRICS
506 UINT16 canWrapLineAfter
: 1;
507 UINT16 isWhitespace
: 1;
508 UINT16 isNewline
: 1;
509 UINT16 isSoftHyphen
: 1;
510 UINT16 isRightToLeft
: 1;
512 } DWRITE_CLUSTER_METRICS
;
514 typedef struct DWRITE_HIT_TEST_METRICS
525 } DWRITE_HIT_TEST_METRICS
;
527 typedef struct DWRITE_SCRIPT_ANALYSIS
530 DWRITE_SCRIPT_SHAPES shapes
;
531 } DWRITE_SCRIPT_ANALYSIS
;
533 typedef struct DWRITE_LINE_BREAKPOINT
535 UINT8 breakConditionBefore
: 2;
536 UINT8 breakConditionAfter
: 2;
537 UINT8 isWhitespace
: 1;
538 UINT8 isSoftHyphen
: 1;
540 } DWRITE_LINE_BREAKPOINT
;
542 typedef struct DWRITE_TYPOGRAPHIC_FEATURES
544 DWRITE_FONT_FEATURE
* features
;
546 } DWRITE_TYPOGRAPHIC_FEATURES
;
548 typedef struct DWRITE_SHAPING_TEXT_PROPERTIES
550 UINT16 isShapedAlone
: 1;
551 UINT16 reserved1
: 1;
552 UINT16 canBreakShapingAfter
: 1;
553 UINT16 reserved
: 13;
554 } DWRITE_SHAPING_TEXT_PROPERTIES
;
556 typedef struct DWRITE_SHAPING_GLYPH_PROPERTIES
558 UINT16 justification
: 4;
559 UINT16 isClusterStart
: 1;
560 UINT16 isDiacritic
: 1;
561 UINT16 isZeroWidthSpace
: 1;
563 } DWRITE_SHAPING_GLYPH_PROPERTIES
;
568 uuid(6d4865fe
-0ab8
-4d91
-8f62
-5dd6be34a3e0
)
570 interface IDWriteFontFileStream
: IUnknown
572 HRESULT ReadFileFragment
(
573 void const **fragment_start
,
575 UINT64 fragment_size
,
576 void **fragment_context
);
578 void ReleaseFileFragment
(void *fragment_context
);
579 HRESULT GetFileSize
(UINT64
*size
);
580 HRESULT GetLastWriteTime
(UINT64
*last_writetime
);
586 uuid(727cad4e
-d6af
-4c9e
-8a08
-d695b11caa49
)
588 interface IDWriteFontFileLoader
: IUnknown
590 HRESULT CreateStreamFromKey
(
593 IDWriteFontFileStream
**stream
);
599 uuid(b2d9f3ec
-c9fe
-4a11
-a2ec
-d86208f7c0a2
)
601 interface IDWriteLocalFontFileLoader
: IDWriteFontFileLoader
603 HRESULT GetFilePathLengthFromKey
(void const *key
, UINT32 key_size
, UINT32
*length
);
604 HRESULT GetFilePathFromKey
(void const *key
, UINT32 key_size
, WCHAR
*path
, UINT32 length
);
605 HRESULT GetLastWriteTimeFromKey
(void const *key
, UINT32 key_size
, FILETIME
*writetime
);
611 uuid(739d886a
-cef5
-47dc
-8769-1a8b41bebbb0
)
613 interface IDWriteFontFile
: IUnknown
615 HRESULT GetReferenceKey
(
619 HRESULT GetLoader
(IDWriteFontFileLoader
**loader
);
622 BOOL
*is_supported_fonttype
,
623 DWRITE_FONT_FILE_TYPE
*file_type
,
624 DWRITE_FONT_FACE_TYPE
*face_type
,
631 uuid(72755049-5ff7
-435d
-8348-4be97cfa6c7c
)
633 interface IDWriteFontFileEnumerator
: IUnknown
635 HRESULT MoveNext
(BOOL
*has_current_file
);
636 HRESULT GetCurrentFontFile
(IDWriteFontFile
**font_file
);
642 uuid(cca920e4
-52f0
-492b
-bfa8
-29c72ee0a468
)
644 interface IDWriteFontCollectionLoader
: IUnknown
646 HRESULT CreateEnumeratorFromKey
(
647 IDWriteFactory
* factory
,
650 IDWriteFontFileEnumerator
**enumerator
);
656 uuid(08256209-099a
-4b34
-b86d
-c22b110e7771
)
658 interface IDWriteLocalizedStrings
: IUnknown
662 HRESULT FindLocaleName
(
663 WCHAR
const *locale_name
,
667 HRESULT GetLocaleNameLength
(UINT32 index
, UINT32
*length
);
668 HRESULT GetLocaleName
(UINT32 index
, WCHAR
*locale_name
, UINT32 size
);
669 HRESULT GetStringLength
(UINT32 index
, UINT32
*length
);
670 HRESULT GetString
(UINT32 index
, WCHAR
*buffer
, UINT32 size
);
676 uuid(2f0da53a
-2add
-47cd
-82ee
-d9ec34688e75
)
678 interface IDWriteRenderingParams
: IUnknown
681 FLOAT GetEnhancedContrast
();
682 FLOAT GetClearTypeLevel
();
683 DWRITE_PIXEL_GEOMETRY GetPixelGeometry
();
684 DWRITE_RENDERING_MODE GetRenderingMode
();
690 uuid(5f49804d
-7024-4d43
-bfa9
-d25984f53849
)
692 interface IDWriteFontFace
: IUnknown
694 DWRITE_FONT_FACE_TYPE GetType
();
695 HRESULT GetFiles
(UINT32
*number_of_files
, IDWriteFontFile
**fontfiles
);
697 DWRITE_FONT_SIMULATIONS GetSimulations
();
699 void GetMetrics
(DWRITE_FONT_METRICS
*metrics
);
700 UINT16 GetGlyphCount
();
702 HRESULT GetDesignGlyphMetrics
(
703 UINT16
const *glyph_indices
,
705 DWRITE_GLYPH_METRICS
*metrics
,
706 [defaultvalue(FALSE
)] BOOL is_sideways
);
708 HRESULT GetGlyphIndices
(
709 UINT32
const *codepoints
,
711 UINT16
*glyph_indices
);
713 HRESULT TryGetFontTable
(
715 const void **table_data
,
720 void ReleaseFontTable
(void *table_context
);
722 HRESULT GetGlyphRunOutline
(
724 UINT16
const *glyph_indices
,
725 FLOAT const* glyph_advances
,
726 DWRITE_GLYPH_OFFSET
const *glyph_offsets
,
730 IDWriteGeometrySink
*geometrysink
);
732 HRESULT GetRecommendedRenderingMode
(
734 FLOAT pixels_per_dip
,
735 DWRITE_MEASURING_MODE mode
,
736 IDWriteRenderingParams
* params
,
737 DWRITE_RENDERING_MODE
* rendering_mode
);
739 HRESULT GetGdiCompatibleMetrics
(
741 FLOAT pixels_per_dip
,
742 DWRITE_MATRIX
const *transform
,
743 DWRITE_FONT_METRICS
*metrics
);
745 HRESULT GetGdiCompatibleGlyphMetrics
(
747 FLOAT pixels_per_dip
,
748 DWRITE_MATRIX
const *transform
,
749 BOOL use_gdi_natural
,
750 UINT16
const *glyph_indices
,
752 DWRITE_GLYPH_METRICS
*metrics
,
753 [defaultvalue(FALSE
)] BOOL is_sideways
);
759 uuid(acd16696
-8c14
-4f5d
-877e
-fe3fc1d32737
)
761 interface IDWriteFont
: IUnknown
763 HRESULT GetFontFamily
(IDWriteFontFamily
**family
);
764 DWRITE_FONT_WEIGHT GetWeight
();
765 DWRITE_FONT_STRETCH GetStretch
();
766 DWRITE_FONT_STYLE GetStyle
();
769 HRESULT GetFaceNames
(IDWriteLocalizedStrings
**names
);
770 HRESULT GetInformationalStrings
(
771 DWRITE_INFORMATIONAL_STRING_ID stringid
,
772 IDWriteLocalizedStrings
**strings
,
775 DWRITE_FONT_SIMULATIONS GetSimulations
();
776 void GetMetrics
(DWRITE_FONT_METRICS
*metrics
);
777 HRESULT HasCharacter
(UINT32 value
, BOOL
*exists
);
778 HRESULT CreateFontFace
(IDWriteFontFace
**face
);
784 uuid(1a0d8438
-1d97
-4ec1
-aef9
-a2fb86ed6acb
)
786 interface IDWriteFontList
: IUnknown
788 HRESULT GetFontCollection
(IDWriteFontCollection
**collection
);
789 UINT32 GetFontCount
();
790 HRESULT GetFont
(UINT32 index
, IDWriteFont
**font
);
796 uuid(da20d8ef
-812a
-4c43
-9802-62ec4abd7add
)
798 interface IDWriteFontFamily
: IDWriteFontList
800 HRESULT GetFamilyNames
(IDWriteLocalizedStrings
**names
);
802 HRESULT GetFirstMatchingFont
(
803 DWRITE_FONT_WEIGHT weight
,
804 DWRITE_FONT_STRETCH stretch
,
805 DWRITE_FONT_STYLE style
,
808 HRESULT GetMatchingFonts
(
809 DWRITE_FONT_WEIGHT weight
,
810 DWRITE_FONT_STRETCH stretch
,
811 DWRITE_FONT_STYLE style
,
812 IDWriteFontList
**fonts
);
818 uuid(a84cee02
-3eea
-4eee
-a827
-87c1a02a0fcc
)
820 interface IDWriteFontCollection
: IUnknown
822 UINT32 GetFontFamilyCount
();
823 HRESULT GetFontFamily
(UINT32 index
, IDWriteFontFamily
**family
);
824 HRESULT FindFamilyName
(WCHAR
const *name
, UINT32
*index
, BOOL
*exists
);
825 HRESULT GetFontFromFontFace
(IDWriteFontFace
*face
, IDWriteFont
**font
);
831 uuid(eaf3a2da
-ecf4
-4d24
-b644
-b34f6842024b
)
833 interface IDWritePixelSnapping
: IUnknown
835 HRESULT IsPixelSnappingDisabled
(
836 void *client_drawingcontext
,
839 HRESULT GetCurrentTransform
(
840 void *client_drawingcontext
,
841 DWRITE_MATRIX
*transform
);
843 HRESULT GetPixelsPerDip
(
844 void *client_drawingcontext
,
845 FLOAT *pixels_per_dip
);
851 uuid(ef8a8135
-5cc6
-45fe
-8825-c5a0724eb819
)
853 interface IDWriteTextRenderer
: IDWritePixelSnapping
855 HRESULT DrawGlyphRun
(
856 void* client_drawingcontext
,
857 FLOAT baselineOriginX
,
858 FLOAT baselineOriginY
,
859 DWRITE_MEASURING_MODE mode
,
860 DWRITE_GLYPH_RUN
const *glyph_run
,
861 DWRITE_GLYPH_RUN_DESCRIPTION
const *run_descr
,
862 IUnknown
*drawing_effect
);
864 HRESULT DrawUnderline
(
865 void *client_drawingcontext
,
866 FLOAT baselineOriginX
,
867 FLOAT baselineOriginY
,
868 DWRITE_UNDERLINE
const* underline
,
869 IUnknown
*drawing_effect
);
871 HRESULT DrawStrikethrough
(
872 void *client_drawingcontext
,
873 FLOAT baselineOriginX
,
874 FLOAT baselineOriginY
,
875 DWRITE_STRIKETHROUGH
const* strikethrough
,
876 IUnknown
*drawing_effect
);
878 HRESULT DrawInlineObject
(
879 void *client_drawingcontext
,
882 IDWriteInlineObject
*object,
885 IUnknown
*drawing_effect
);
891 uuid(8339fde3
-106f
-47ab
-8373-1c6295eb10b3
)
893 interface IDWriteInlineObject
: IUnknown
896 void* client_drawingontext
,
897 IDWriteTextRenderer
* renderer
,
902 IUnknown
*drawing_effect
);
904 HRESULT GetMetrics
(DWRITE_INLINE_OBJECT_METRICS
*metrics
);
905 HRESULT GetOverhangMetrics
(DWRITE_OVERHANG_METRICS
*overhangs
);
906 HRESULT GetBreakConditions
(
907 DWRITE_BREAK_CONDITION
* condition_before
,
908 DWRITE_BREAK_CONDITION
* condition_after
);
914 uuid(9c906818
-31d7
-4fd3
-a151
-7c5e225db55a
)
916 interface IDWriteTextFormat
: IUnknown
918 HRESULT SetTextAlignment
(DWRITE_TEXT_ALIGNMENT alignment
);
919 HRESULT SetParagraphAlignment
(DWRITE_PARAGRAPH_ALIGNMENT alignment
);
920 HRESULT SetWordWrapping
(DWRITE_WORD_WRAPPING wrapping
);
921 HRESULT SetReadingDirection
(DWRITE_READING_DIRECTION direction
);
922 HRESULT SetFlowDirection
(DWRITE_FLOW_DIRECTION direction
);
923 HRESULT SetIncrementalTabStop
(FLOAT tabstop
);
924 HRESULT SetTrimming
(DWRITE_TRIMMING
const *trimming
, IDWriteInlineObject
*trimming_sign
);
925 HRESULT SetLineSpacing
(DWRITE_LINE_SPACING_METHOD spacing
, FLOAT line_spacing
, FLOAT baseline
);
926 DWRITE_TEXT_ALIGNMENT GetTextAlignment
();
927 DWRITE_PARAGRAPH_ALIGNMENT GetParagraphAlignment
();
928 DWRITE_WORD_WRAPPING GetWordWrapping
();
929 DWRITE_READING_DIRECTION GetReadingDirection
();
930 DWRITE_FLOW_DIRECTION GetFlowDirection
();
931 FLOAT GetIncrementalTabStop
();
932 HRESULT GetTrimming
(DWRITE_TRIMMING
*options
, IDWriteInlineObject
**trimming_sign
);
934 HRESULT GetLineSpacing
(
935 DWRITE_LINE_SPACING_METHOD
*method
,
939 HRESULT GetFontCollection
(IDWriteFontCollection
**collection
);
940 UINT32 GetFontFamilyNameLength
();
941 HRESULT GetFontFamilyName
(WCHAR
*name
, UINT32 size
);
942 DWRITE_FONT_WEIGHT GetFontWeight
();
943 DWRITE_FONT_STYLE GetFontStyle
();
944 DWRITE_FONT_STRETCH GetFontStretch
();
946 UINT32 GetLocaleNameLength
();
947 HRESULT GetLocaleName
(WCHAR
*name
, UINT32 size
);
953 uuid(55f1112b
-1dc2
-4b3c
-9541-f46894ed85b6
)
955 interface IDWriteTypography
: IUnknown
957 HRESULT AddFontFeature
(DWRITE_FONT_FEATURE feature
);
958 UINT32 GetFontFeatureCount
();
959 HRESULT GetFontFeature
(UINT32 index
, DWRITE_FONT_FEATURE
*feature
);
965 uuid(5e5a32a3
-8dff
-4773-9ff6
-0696eab77267
)
967 interface IDWriteBitmapRenderTarget
: IUnknown
969 HRESULT DrawGlyphRun
(
970 FLOAT baselineOriginX
,
971 FLOAT baselineOriginY
,
972 DWRITE_MEASURING_MODE measuring_mode
,
973 DWRITE_GLYPH_RUN
const* glyph_run
,
974 IDWriteRenderingParams
* params
,
976 [defaultvalue(NULL
)] RECT
*blackbox_rect
);
979 FLOAT GetPixelsPerDip
();
980 HRESULT SetPixelsPerDip
(FLOAT pixels_per_dip
);
981 HRESULT GetCurrentTransform
(DWRITE_MATRIX
*transform
);
982 HRESULT SetCurrentTransform
(DWRITE_MATRIX
const *transform
);
983 HRESULT GetSize
(SIZE
*size
);
984 HRESULT Resize
(UINT32 width
, UINT32 height
);
987 cpp_quote
("#ifndef _WINGDI_")
988 /* already defined in wingdi.h but needed for WIDL */
989 #define LF_FACESIZE
32
991 typedef struct tagLOGFONTW
1002 BYTE lfOutPrecision
;
1003 BYTE lfClipPrecision
;
1005 BYTE lfPitchAndFamily
;
1006 WCHAR lfFaceName
[LF_FACESIZE
];
1007 } LOGFONTW
, *PLOGFONTW
, *LPLOGFONTW
;
1008 cpp_quote
("#endif /* _WINGDI_ */")
1013 uuid(1edd9491
-9853-4299-898f
-6432983b6f3a
)
1015 interface IDWriteGdiInterop
: IUnknown
1017 HRESULT CreateFontFromLOGFONT
(LOGFONTW
const *logfont
, IDWriteFont
**font
);
1018 HRESULT ConvertFontToLOGFONT
(
1021 BOOL
*is_systemfont
);
1023 HRESULT ConvertFontFaceToLOGFONT
(IDWriteFontFace
* font
, LOGFONTW
* logfont
);
1024 HRESULT CreateFontFaceFromHdc
(HDC hdc
, IDWriteFontFace
**fontface
);
1025 HRESULT CreateBitmapRenderTarget
(HDC hdc
, UINT32 width
, UINT32 height
, IDWriteBitmapRenderTarget
**target
);
1031 uuid(53737037-6d14
-410b
-9bfe
-0b182bb70961
)
1033 interface IDWriteTextLayout
: IDWriteTextFormat
1035 HRESULT SetMaxWidth
(FLOAT maxWidth
);
1036 HRESULT SetMaxHeight
(FLOAT maxHeight
);
1037 HRESULT SetFontCollection
(IDWriteFontCollection
* collection
, DWRITE_TEXT_RANGE
range);
1038 HRESULT SetFontFamilyName
(WCHAR
const *name
, DWRITE_TEXT_RANGE
range);
1039 HRESULT SetFontWeight
(DWRITE_FONT_WEIGHT weight
, DWRITE_TEXT_RANGE
range);
1040 HRESULT SetFontStyle
(DWRITE_FONT_STYLE style
, DWRITE_TEXT_RANGE
range);
1041 HRESULT SetFontStretch
(DWRITE_FONT_STRETCH stretch
, DWRITE_TEXT_RANGE
range);
1042 HRESULT SetFontSize
(FLOAT size
, DWRITE_TEXT_RANGE
range);
1043 HRESULT SetUnderline
(BOOL underline
, DWRITE_TEXT_RANGE
range);
1044 HRESULT SetStrikethrough
(BOOL strikethrough
, DWRITE_TEXT_RANGE
range);
1045 HRESULT SetDrawingEffect
(IUnknown
* effect
, DWRITE_TEXT_RANGE
range);
1046 HRESULT SetInlineObject
(IDWriteInlineObject
*object, DWRITE_TEXT_RANGE
range);
1047 HRESULT SetTypography
(IDWriteTypography
* typography
, DWRITE_TEXT_RANGE
range);
1048 HRESULT SetLocaleName
(WCHAR
const* locale
, DWRITE_TEXT_RANGE
range);
1050 FLOAT GetMaxWidth
();
1051 FLOAT GetMaxHeight
();
1052 HRESULT GetFontCollection
(
1054 IDWriteFontCollection
** collection
,
1055 [defaultvalue(NULL
)] DWRITE_TEXT_RANGE
*range);
1057 HRESULT GetFontFamilyNameLength
(
1060 [defaultvalue(NULL
)] DWRITE_TEXT_RANGE
*range);
1062 HRESULT GetFontFamilyName
(
1066 [defaultvalue(NULL
)] DWRITE_TEXT_RANGE
*range);
1068 HRESULT GetFontWeight
(
1070 DWRITE_FONT_WEIGHT
*weight
,
1071 [defaultvalue(NULL
)] DWRITE_TEXT_RANGE
*range);
1073 HRESULT GetFontStyle
(
1074 UINT32 currentPosition
,
1075 DWRITE_FONT_STYLE
*style
,
1076 [defaultvalue(NULL
)] DWRITE_TEXT_RANGE
*range);
1078 HRESULT GetFontStretch
(
1080 DWRITE_FONT_STRETCH
*stretch
,
1081 [defaultvalue(NULL
)] DWRITE_TEXT_RANGE
*range);
1083 HRESULT GetFontSize
(
1086 [defaultvalue(NULL
)] DWRITE_TEXT_RANGE
*range);
1088 HRESULT GetUnderline
(
1090 BOOL
*has_underline
,
1091 [defaultvalue(NULL
)] DWRITE_TEXT_RANGE
*range);
1093 HRESULT GetStrikethrough
(
1095 BOOL
*has_strikethrough
,
1096 [defaultvalue(NULL
)] DWRITE_TEXT_RANGE
*range);
1098 HRESULT GetDrawingEffect
(
1101 [defaultvalue(NULL
)] DWRITE_TEXT_RANGE
*range);
1103 HRESULT GetInlineObject
(
1105 IDWriteInlineObject
**object,
1106 [defaultvalue(NULL
)] DWRITE_TEXT_RANGE
*range);
1108 HRESULT GetTypography
(
1110 IDWriteTypography
** typography
,
1111 [defaultvalue(NULL
)] DWRITE_TEXT_RANGE
*range);
1113 HRESULT GetLocaleNameLength
(
1116 [defaultvalue(NULL
)] DWRITE_TEXT_RANGE
*range);
1118 HRESULT GetLocaleName
(
1122 [defaultvalue(NULL
)] DWRITE_TEXT_RANGE
*range);
1126 IDWriteTextRenderer
* renderer
,
1130 HRESULT GetLineMetrics
(
1131 DWRITE_LINE_METRICS
*metrics
,
1133 UINT32
*actual_count
);
1135 HRESULT GetMetrics
(DWRITE_TEXT_METRICS
*metrics
);
1136 HRESULT GetOverhangMetrics
(DWRITE_OVERHANG_METRICS
*overhangs
);
1137 HRESULT GetClusterMetrics
(
1138 DWRITE_CLUSTER_METRICS
*metrics
,
1142 HRESULT DetermineMinWidth
(FLOAT* min_width
);
1143 HRESULT HitTestPoint
(
1146 BOOL
* is_trailinghit
,
1148 DWRITE_HIT_TEST_METRICS
*metrics
);
1150 HRESULT HitTestTextPosition
(
1151 UINT32 textPosition
,
1152 BOOL is_trailinghit
,
1155 DWRITE_HIT_TEST_METRICS
*metrics
);
1157 HRESULT HitTestTextRange
(
1158 UINT32 textPosition
,
1162 DWRITE_HIT_TEST_METRICS
*metrics
,
1163 UINT32 max_metricscount
,
1164 UINT32
* actual_metricscount
);
1170 uuid(14885cc9
-bab0
-4f90
-b6ed
-5c366a2cd03d
)
1172 interface IDWriteNumberSubstitution
: IUnknown
1179 uuid(688e1a58
-5094-47c8
-adc8
-fbcea60ae92b
)
1181 interface IDWriteTextAnalysisSource
: IUnknown
1183 HRESULT GetTextAtPosition
(
1188 HRESULT GetTextBeforePosition
(
1193 DWRITE_READING_DIRECTION GetParagraphReadingDirection
();
1194 HRESULT GetLocaleName
(
1197 WCHAR
const** locale
);
1199 HRESULT GetNumberSubstitution
(
1202 IDWriteNumberSubstitution
**substitution
);
1208 uuid(5810cd44
-0ca0
-4701-b3fa
-bec5182ae4f6
)
1210 interface IDWriteTextAnalysisSink
: IUnknown
1212 HRESULT SetScriptAnalysis
(
1215 DWRITE_SCRIPT_ANALYSIS
const* scriptanalysis
);
1217 HRESULT SetLineBreakpoints
(
1220 DWRITE_LINE_BREAKPOINT
const* breakpoints
);
1222 HRESULT SetBidiLevel
(
1225 UINT8 explicitLevel
,
1226 UINT8 resolvedLevel
);
1228 HRESULT SetNumberSubstitution
(
1231 IDWriteNumberSubstitution
* substitution
);
1237 uuid(b7e6163e
-7f46
-43b4
-84b3
-e4e6249c365d
)
1239 interface IDWriteTextAnalyzer
: IUnknown
1241 HRESULT AnalyzeScript
(
1242 IDWriteTextAnalysisSource
* source,
1245 IDWriteTextAnalysisSink
* sink
);
1247 HRESULT AnalyzeBidi
(
1248 IDWriteTextAnalysisSource
* source,
1251 IDWriteTextAnalysisSink
* sink
);
1253 HRESULT AnalyzeNumberSubstitution
(
1254 IDWriteTextAnalysisSource
* source,
1257 IDWriteTextAnalysisSink
* sink
);
1259 HRESULT AnalyzeLineBreakpoints
(
1260 IDWriteTextAnalysisSource
* source,
1263 IDWriteTextAnalysisSink
* sink
);
1268 IDWriteFontFace
* font_face
,
1271 DWRITE_SCRIPT_ANALYSIS
const* analysis
,
1272 WCHAR
const* locale
,
1273 IDWriteNumberSubstitution
* substitution
,
1274 DWRITE_TYPOGRAPHIC_FEATURES
const** features
,
1275 UINT32
const* feature_range_len
,
1276 UINT32 feature_ranges
,
1277 UINT32 max_glyph_count
,
1279 DWRITE_SHAPING_TEXT_PROPERTIES
* text_props
,
1280 UINT16
* glyph_indices
,
1281 DWRITE_SHAPING_GLYPH_PROPERTIES
* glyph_props
,
1282 UINT32
* actual_glyph_count
);
1284 HRESULT GetGlyphPlacements
(
1286 UINT16
const* clustermap
,
1287 DWRITE_SHAPING_TEXT_PROPERTIES
* props
,
1289 UINT16
const* glyph_indices
,
1290 DWRITE_SHAPING_GLYPH_PROPERTIES
const* glyph_props
,
1292 IDWriteFontFace
* font_face
,
1296 DWRITE_SCRIPT_ANALYSIS
const* analysis
,
1297 WCHAR
const* locale
,
1298 DWRITE_TYPOGRAPHIC_FEATURES
const** features
,
1299 UINT32
const* feature_range_len
,
1300 UINT32 feature_ranges
,
1301 FLOAT* glyph_advances
,
1302 DWRITE_GLYPH_OFFSET
* glyph_offsets
);
1304 HRESULT GetGdiCompatibleGlyphPlacements
(
1306 UINT16
const* clustermap
,
1307 DWRITE_SHAPING_TEXT_PROPERTIES
* props
,
1309 UINT16
const* glyph_indices
,
1310 DWRITE_SHAPING_GLYPH_PROPERTIES
const* glyph_props
,
1312 IDWriteFontFace
* font_face
,
1314 FLOAT pixels_per_dip
,
1315 DWRITE_MATRIX
const* transform
,
1316 BOOL use_gdi_natural
,
1319 DWRITE_SCRIPT_ANALYSIS
const* analysis
,
1320 WCHAR
const* locale
,
1321 DWRITE_TYPOGRAPHIC_FEATURES
const** features
,
1322 UINT32
const* feature_range_lengths
,
1323 UINT32 feature_ranges
,
1324 FLOAT* glyph_advances
,
1325 DWRITE_GLYPH_OFFSET
* glyph_offsets
);
1331 uuid(7d97dbf7
-e085
-42d4
-81e3
-6a883bded118
)
1333 interface IDWriteGlyphRunAnalysis
: IUnknown
1335 HRESULT GetAlphaTextureBounds
(DWRITE_TEXTURE_TYPE type
, RECT
* bounds
);
1336 HRESULT CreateAlphaTexture
(DWRITE_TEXTURE_TYPE type
, RECT
const* bounds
, BYTE* alphaValues
, UINT32 bufferSize
);
1337 HRESULT GetAlphaBlendParams
(
1338 IDWriteRenderingParams
* renderingParams
,
1340 FLOAT* blendEnhancedContrast
,
1341 FLOAT* blendClearTypeLevel
);
1347 uuid(b859ee5a
-d838
-4b5b
-a2e8
-1adc7d93db48
)
1349 interface IDWriteFactory
: IUnknown
1351 HRESULT GetSystemFontCollection
(IDWriteFontCollection
**collection
,
1352 [defaultvalue(FALSE
)] BOOL check_for_updates
);
1354 HRESULT CreateCustomFontCollection
(
1355 IDWriteFontCollectionLoader
*loader
,
1358 IDWriteFontCollection
**collection
);
1360 HRESULT RegisterFontCollectionLoader
(IDWriteFontCollectionLoader
*loader
);
1362 HRESULT UnregisterFontCollectionLoader
(IDWriteFontCollectionLoader
*loader
);
1364 HRESULT CreateFontFileReference
(
1366 FILETIME
const *writetime
,
1367 IDWriteFontFile
**font_file
);
1369 HRESULT CreateCustomFontFileReference
(
1370 void const *reference_key
,
1372 IDWriteFontFileLoader
*loader
,
1373 IDWriteFontFile
**font_file
);
1375 HRESULT CreateFontFace
(
1376 DWRITE_FONT_FACE_TYPE facetype
,
1377 UINT32 files_number
,
1378 IDWriteFontFile
* const* font_files
,
1380 DWRITE_FONT_SIMULATIONS sim_flags
,
1381 IDWriteFontFace
**font_face
);
1383 HRESULT CreateRenderingParams
(IDWriteRenderingParams
**params
);
1385 HRESULT CreateMonitorRenderingParams
(
1387 IDWriteRenderingParams
**params
);
1389 HRESULT CreateCustomRenderingParams
(
1391 FLOAT enhancedContrast
,
1392 FLOAT cleartype_level
,
1393 DWRITE_PIXEL_GEOMETRY geometry
,
1394 DWRITE_RENDERING_MODE mode
,
1395 IDWriteRenderingParams
**params
);
1397 HRESULT RegisterFontFileLoader
(IDWriteFontFileLoader
*loader
);
1399 HRESULT UnregisterFontFileLoader
(IDWriteFontFileLoader
*loader
);
1401 HRESULT CreateTextFormat
(
1402 WCHAR
const* family_name
,
1403 IDWriteFontCollection
*collection
,
1404 DWRITE_FONT_WEIGHT weight
,
1405 DWRITE_FONT_STYLE style
,
1406 DWRITE_FONT_STRETCH stretch
,
1408 WCHAR
const *locale
,
1409 IDWriteTextFormat
**format
);
1411 HRESULT CreateTypography
(IDWriteTypography
**typography
);
1413 HRESULT GetGdiInterop
(IDWriteGdiInterop
**gdi_interop
);
1415 HRESULT CreateTextLayout
(
1416 WCHAR
const* string,
1418 IDWriteTextFormat
*format
,
1421 IDWriteTextLayout
**layout
);
1423 HRESULT CreateGdiCompatibleTextLayout
(
1424 WCHAR
const* string,
1426 IDWriteTextFormat
*format
,
1428 FLOAT layout_height
,
1429 FLOAT pixels_per_dip
,
1430 DWRITE_MATRIX
const* transform
,
1431 BOOL use_gdi_natural
,
1432 IDWriteTextLayout
**layout
);
1434 HRESULT CreateEllipsisTrimmingSign
(
1435 IDWriteTextFormat
*format
,
1436 IDWriteInlineObject
**trimming_sign
);
1438 HRESULT CreateTextAnalyzer
(IDWriteTextAnalyzer
**analyzer
);
1440 HRESULT CreateNumberSubstitution
(
1441 DWRITE_NUMBER_SUBSTITUTION_METHOD method
,
1442 WCHAR
const* locale
,
1443 BOOL ignore_user_override
,
1444 IDWriteNumberSubstitution
**substitution
);
1446 HRESULT CreateGlyphRunAnalysis
(
1447 DWRITE_GLYPH_RUN
const *glyph_run
,
1448 FLOAT pixels_per_dip
,
1449 DWRITE_MATRIX
const* transform
,
1450 DWRITE_RENDERING_MODE rendering_mode
,
1451 DWRITE_MEASURING_MODE measuring_mode
,
1454 IDWriteGlyphRunAnalysis
**analysis
);
1457 cpp_quote
("HRESULT WINAPI DWriteCreateFactory(DWRITE_FACTORY_TYPE,REFIID,IUnknown**);")
1460 cpp_quote
("#define FACILITY_DWRITE 0x898")
1461 cpp_quote
("#define DWRITE_ERR_BASE 0x5000")
1462 cpp_quote
("#define MAKE_DWRITE_HR(severity, code) MAKE_HRESULT(severity, FACILITY_DWRITE, (DWRITE_ERR_BASE + code))")
1463 cpp_quote
("#define MAKE_DWRITE_HR_ERR(code) MAKE_DWRITE_HR(SEVERITY_ERROR, code)")