2 * Copyright 2016 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
"dwrite_2.idl";
21 interface IDWriteFontFaceReference
;
22 interface IDWriteFontFaceReference1
;
23 interface IDWriteFontFace3
;
24 interface IDWriteFontSet
;
25 interface IDWriteFontDownloadQueue
;
26 interface IDWriteFontFace5
;
27 interface IDWriteFontList2
;
29 cpp_quote
("#ifndef _WINGDI_")
30 /* already defined in wingdi.h but needed for WIDL */
31 typedef struct FONTSIGNATURE FONTSIGNATURE
;
32 cpp_quote
("#endif /* _WINGDI_ */")
34 typedef enum DWRITE_LOCALITY
36 DWRITE_LOCALITY_REMOTE
,
37 DWRITE_LOCALITY_PARTIAL
,
41 typedef enum DWRITE_RENDERING_MODE1
43 DWRITE_RENDERING_MODE1_DEFAULT
,
44 DWRITE_RENDERING_MODE1_ALIASED
,
45 DWRITE_RENDERING_MODE1_GDI_CLASSIC
,
46 DWRITE_RENDERING_MODE1_GDI_NATURAL
,
47 DWRITE_RENDERING_MODE1_NATURAL
,
48 DWRITE_RENDERING_MODE1_NATURAL_SYMMETRIC
,
49 DWRITE_RENDERING_MODE1_OUTLINE
,
50 DWRITE_RENDERING_MODE1_NATURAL_SYMMETRIC_DOWNSAMPLED
51 } DWRITE_RENDERING_MODE1
;
53 typedef enum DWRITE_FONT_PROPERTY_ID
55 DWRITE_FONT_PROPERTY_ID_NONE
,
56 DWRITE_FONT_PROPERTY_ID_WEIGHT_STRETCH_STYLE_FAMILY_NAME
,
57 DWRITE_FONT_PROPERTY_ID_TYPOGRAPHIC_FAMILY_NAME
,
58 DWRITE_FONT_PROPERTY_ID_WEIGHT_STRETCH_STYLE_FACE_NAME
,
59 DWRITE_FONT_PROPERTY_ID_FULL_NAME
,
60 DWRITE_FONT_PROPERTY_ID_WIN32_FAMILY_NAME
,
61 DWRITE_FONT_PROPERTY_ID_POSTSCRIPT_NAME
,
62 DWRITE_FONT_PROPERTY_ID_DESIGN_SCRIPT_LANGUAGE_TAG
,
63 DWRITE_FONT_PROPERTY_ID_SUPPORTED_SCRIPT_LANGUAGE_TAG
,
64 DWRITE_FONT_PROPERTY_ID_SEMANTIC_TAG
,
65 DWRITE_FONT_PROPERTY_ID_WEIGHT
,
66 DWRITE_FONT_PROPERTY_ID_STRETCH
,
67 DWRITE_FONT_PROPERTY_ID_STYLE
,
68 DWRITE_FONT_PROPERTY_ID_TYPOGRAPHIC_FACE_NAME
,
69 DWRITE_FONT_PROPERTY_ID_TOTAL
= DWRITE_FONT_PROPERTY_ID_STYLE
+ 1,
70 DWRITE_FONT_PROPERTY_ID_TOTAL_RS3
= DWRITE_FONT_PROPERTY_ID_TYPOGRAPHIC_FACE_NAME
+ 1,
71 DWRITE_FONT_PROPERTY_ID_FAMILY_NAME
= DWRITE_FONT_PROPERTY_ID_TYPOGRAPHIC_FAMILY_NAME
,
72 DWRITE_FONT_PROPERTY_ID_PREFERRED_FAMILY_NAME
= DWRITE_FONT_PROPERTY_ID_WEIGHT_STRETCH_STYLE_FAMILY_NAME
,
73 DWRITE_FONT_PROPERTY_ID_FACE_NAME
= DWRITE_FONT_PROPERTY_ID_WEIGHT_STRETCH_STYLE_FACE_NAME
,
74 } DWRITE_FONT_PROPERTY_ID
;
76 typedef struct DWRITE_FONT_PROPERTY
78 DWRITE_FONT_PROPERTY_ID propertyId
;
79 WCHAR
const *propertyValue
;
80 WCHAR
const *localeName
;
81 } DWRITE_FONT_PROPERTY
;
83 cpp_quote
("#ifdef __cplusplus")
84 cpp_quote
("#define DWRITE_MAKE_FONT_AXIS_TAG(a,b,c,d) (static_cast<DWRITE_FONT_AXIS_TAG>(DWRITE_MAKE_OPENTYPE_TAG(a,b,c,d)))")
86 cpp_quote
("#define DWRITE_MAKE_FONT_AXIS_TAG(a,b,c,d) (DWRITE_MAKE_OPENTYPE_TAG(a,b,c,d))")
89 typedef enum DWRITE_FONT_AXIS_TAG
91 DWRITE_FONT_AXIS_TAG_WEIGHT
= 0x74686777, /* 'wght' */
92 DWRITE_FONT_AXIS_TAG_WIDTH
= 0x68746477, /* 'wdth' */
93 DWRITE_FONT_AXIS_TAG_SLANT
= 0x746e6c73, /* 'slnt' */
94 DWRITE_FONT_AXIS_TAG_OPTICAL_SIZE
= 0x7a73706f, /* 'opsz' */
95 DWRITE_FONT_AXIS_TAG_ITALIC
= 0x6c617469, /* 'ital' */
96 } DWRITE_FONT_AXIS_TAG
;
98 typedef enum DWRITE_FONT_SOURCE_TYPE
100 DWRITE_FONT_SOURCE_TYPE_UNKNOWN
,
101 DWRITE_FONT_SOURCE_TYPE_PER_MACHINE
,
102 DWRITE_FONT_SOURCE_TYPE_PER_USER
,
103 DWRITE_FONT_SOURCE_TYPE_APPX_PACKAGE
,
104 DWRITE_FONT_SOURCE_TYPE_REMOTE_FONT_PROVIDER
105 } DWRITE_FONT_SOURCE_TYPE
;
107 typedef struct DWRITE_FONT_AXIS_VALUE
109 DWRITE_FONT_AXIS_TAG axisTag
;
111 } DWRITE_FONT_AXIS_VALUE
;
113 typedef struct DWRITE_FONT_AXIS_RANGE
115 DWRITE_FONT_AXIS_TAG axisTag
;
118 } DWRITE_FONT_AXIS_RANGE
;
120 typedef enum DWRITE_AUTOMATIC_FONT_AXES
122 DWRITE_AUTOMATIC_FONT_AXES_NONE
,
123 DWRITE_AUTOMATIC_FONT_AXES_OPTICAL_SIZE
,
124 } DWRITE_AUTOMATIC_FONT_AXES
;
126 typedef enum DWRITE_FONT_AXIS_ATTRIBUTES
128 DWRITE_FONT_AXIS_ATTRIBUTES_NONE
,
129 DWRITE_FONT_AXIS_ATTRIBUTES_VARIABLE
,
130 DWRITE_FONT_AXIS_ATTRIBUTES_HIDDEN
,
131 } DWRITE_FONT_AXIS_ATTRIBUTES
;
133 typedef enum DWRITE_FONT_FAMILY_MODEL
135 DWRITE_FONT_FAMILY_MODEL_TYPOGRAPHIC
,
136 DWRITE_FONT_FAMILY_MODEL_WEIGHT_STRETCH_STYLE
,
137 } DWRITE_FONT_FAMILY_MODEL
;
142 uuid(b06fe5b9
-43ec
-4393-881b
-dbe4dc72fda7
)
144 interface IDWriteFontDownloadListener
: IUnknown
146 void DownloadCompleted
(IDWriteFontDownloadQueue
*queue
, IUnknown
*context
, HRESULT result
);
152 uuid(b71e6052
-5aea
-4fa3
-832e
-f60d431f7e91
)
154 interface IDWriteFontDownloadQueue
: IUnknown
156 HRESULT AddListener
(IDWriteFontDownloadListener
*listener
, UINT32
*token
);
157 HRESULT RemoveListener
(UINT32 token
);
159 HRESULT BeginDownload
(IUnknown
*context
);
160 HRESULT CancelDownload
();
161 UINT64 GetGenerationCount
();
167 uuid(b7924baa
-391b
-412a
-8c5c
-e44cc2d867dc
)
169 interface IDWriteRenderingParams3
: IDWriteRenderingParams2
171 DWRITE_RENDERING_MODE1 GetRenderingMode1
();
177 uuid(cfee3140
-1257-47ca
-8b85
-31bfcf3f2d0e
)
179 interface IDWriteStringList
: IUnknown
182 HRESULT GetLocaleNameLength
(UINT32 index
, UINT32
*length
);
183 HRESULT GetLocaleName
(UINT32 index
, WCHAR
*name
, UINT32 size
);
184 HRESULT GetStringLength
(UINT32 index
, UINT32
*length
);
185 HRESULT GetString
(UINT32 index
, WCHAR
*string, UINT32 size
);
191 uuid(53585141-d9f8
-4095-8321-d73cf6bd116b
)
193 interface IDWriteFontSet
: IUnknown
195 UINT32 GetFontCount
();
196 HRESULT GetFontFaceReference
(UINT32 index
, IDWriteFontFaceReference
**reference
);
197 HRESULT FindFontFaceReference
(IDWriteFontFaceReference
*reference
,
198 UINT32
*index
, BOOL
*exists
);
199 HRESULT FindFontFace
(IDWriteFontFace
*fontface
, UINT32
*index
, BOOL
*exists
);
200 HRESULT GetPropertyValues__
(DWRITE_FONT_PROPERTY_ID
id, IDWriteStringList
**values
);
201 HRESULT GetPropertyValues_
(DWRITE_FONT_PROPERTY_ID
id,
202 WCHAR
const *preferred_locales
, IDWriteStringList
**values
);
203 HRESULT GetPropertyValues
(UINT32 index
, DWRITE_FONT_PROPERTY_ID
id, BOOL
*exists
,
204 IDWriteLocalizedStrings
**values
);
205 HRESULT GetPropertyOccurrenceCount
(DWRITE_FONT_PROPERTY
const *property
, UINT32
*count
);
206 HRESULT GetMatchingFonts_
(WCHAR
const *family
, DWRITE_FONT_WEIGHT weight
, DWRITE_FONT_STRETCH stretch
,
207 DWRITE_FONT_STYLE style
, IDWriteFontSet
**fontset
);
208 HRESULT GetMatchingFonts
(DWRITE_FONT_PROPERTY
const *props
, UINT32 count
, IDWriteFontSet
**fontset
);
214 uuid(1f803a76
-6871-48e8
-987f
-b975551c50f2
)
216 interface IDWriteFontResource
: IUnknown
218 HRESULT GetFontFile
(IDWriteFontFile
**fontfile
);
219 UINT32 GetFontFaceIndex
();
220 UINT32 GetFontAxisCount
();
221 HRESULT GetDefaultFontAxisValues
(
222 DWRITE_FONT_AXIS_VALUE
*values
,
224 HRESULT GetFontAxisRanges
(
225 DWRITE_FONT_AXIS_RANGE
*ranges
,
227 DWRITE_FONT_AXIS_ATTRIBUTES GetFontAxisAttributes
(
229 HRESULT GetAxisNames
(
231 IDWriteLocalizedStrings
**names
);
232 UINT32 GetAxisValueNameCount
(
234 HRESULT GetAxisValueNames
(
237 DWRITE_FONT_AXIS_RANGE
*axis_range
,
238 IDWriteLocalizedStrings
**names
);
239 BOOL HasVariations
();
240 HRESULT CreateFontFace
(
241 DWRITE_FONT_SIMULATIONS simulations
,
242 DWRITE_FONT_AXIS_VALUE
const *axis_values
,
244 IDWriteFontFace5
**fontface
);
245 HRESULT CreateFontFaceReference
(
246 DWRITE_FONT_SIMULATIONS simulations
,
247 DWRITE_FONT_AXIS_VALUE
const *axis_values
,
249 IDWriteFontFaceReference1
**reference
);
255 uuid(7e9fda85
-6c92
-4053-bc47
-7ae3530db4d3
)
257 interface IDWriteFontSet1
: IDWriteFontSet
259 HRESULT GetMatchingFonts
(
260 DWRITE_FONT_PROPERTY
const *property
,
261 DWRITE_FONT_AXIS_VALUE
const *axis_values
,
263 IDWriteFontSet1
**fontset
);
264 HRESULT GetFirstFontResources
(IDWriteFontSet1
**fontset
);
265 HRESULT GetFilteredFonts__
(
266 UINT32
const *indices
,
268 IDWriteFontSet1
**fontset
);
269 HRESULT GetFilteredFonts_
(
270 DWRITE_FONT_AXIS_RANGE
const *axis_ranges
,
272 BOOL select_any_range
,
273 IDWriteFontSet1
**fontset
);
274 HRESULT GetFilteredFonts
(
275 DWRITE_FONT_PROPERTY
const *props
,
276 UINT32 num_properties
,
277 BOOL select_any_property
,
278 IDWriteFontSet1
**fontset
);
279 HRESULT GetFilteredFontIndices_
(
280 DWRITE_FONT_AXIS_RANGE
const *ranges
,
282 BOOL select_any_range
,
285 UINT32
*actual_num_indices
);
286 HRESULT GetFilteredFontIndices
(
287 DWRITE_FONT_PROPERTY
const *props
,
288 UINT32 num_properties
,
289 BOOL select_any_range
,
292 UINT32
*actual_num_indices
);
293 HRESULT GetFontAxisRanges_
(
295 DWRITE_FONT_AXIS_RANGE
*axis_ranges
,
297 UINT32
*actual_num_ranges
);
298 HRESULT GetFontAxisRanges
(
299 DWRITE_FONT_AXIS_RANGE
*axis_ranges
,
301 UINT32
*actual_num_ranges
);
302 HRESULT GetFontFaceReference
(
304 IDWriteFontFaceReference1
**reference
);
305 HRESULT CreateFontResource
(
307 IDWriteFontResource
**resource
);
308 HRESULT CreateFontFace
(
310 IDWriteFontFace5
**fontface
);
311 DWRITE_LOCALITY GetFontLocality
(UINT32 index
);
317 uuid(29748ed6
-8c9c
-4a6a
-be0b
-d912e8538944
)
319 interface IDWriteFont3
: IDWriteFont2
321 HRESULT CreateFontFace
(IDWriteFontFace3
**fontface
);
322 BOOL Equals
(IDWriteFont
*font
);
323 HRESULT GetFontFaceReference
(IDWriteFontFaceReference
**reference
);
324 BOOL HasCharacter
(UINT32 character
);
325 DWRITE_LOCALITY GetLocality
();
331 uuid(da20d8ef
-812a
-4c43
-9802-62ec4abd7adf
)
333 interface IDWriteFontFamily1
: IDWriteFontFamily
335 DWRITE_LOCALITY GetFontLocality
(UINT32 index
);
336 HRESULT GetFont
(UINT32 index
, IDWriteFont3
**font
);
337 HRESULT GetFontFaceReference
(UINT32 index
, IDWriteFontFaceReference
**reference
);
343 uuid(3ed49e77
-a398
-4261-b9cf
-c126c2131ef3
)
345 interface IDWriteFontFamily2
: IDWriteFontFamily1
347 HRESULT GetMatchingFonts
(
348 DWRITE_FONT_AXIS_VALUE
const *axis_values
,
350 IDWriteFontList2
**fontlist
);
351 HRESULT GetFontSet
(IDWriteFontSet1
**fontset
);
357 uuid(53585141-d9f8
-4095-8321-d73cf6bd116c
)
359 interface IDWriteFontCollection1
: IDWriteFontCollection
361 HRESULT GetFontSet
(IDWriteFontSet
**fontset
);
362 HRESULT GetFontFamily
(UINT32 index
, IDWriteFontFamily1
**family
);
368 uuid(514039c6
-4617-4064-bf8b
-92ea83e506e0
)
370 interface IDWriteFontCollection2
: IDWriteFontCollection1
372 HRESULT GetFontFamily
(
374 IDWriteFontFamily2
**family
);
375 HRESULT GetMatchingFonts
(
376 const WCHAR
*familyname
,
377 DWRITE_FONT_AXIS_VALUE
const *axis_values
,
379 IDWriteFontList2
**fontlist
);
380 DWRITE_FONT_FAMILY_MODEL GetFontFamilyModel
();
381 HRESULT GetFontSet
(IDWriteFontSet1
**fontset
);
387 uuid(a4d055a6
-f9e3
-4e25
-93b7
-9e309f3af8e9
)
389 interface IDWriteFontCollection3
: IDWriteFontCollection2
391 HANDLE GetExpirationEvent
();
397 uuid(5e7fa7ca
-dde3
-424c
-89f0
-9fcd6fed58cd
)
399 interface IDWriteFontFaceReference
: IUnknown
401 HRESULT CreateFontFace
(IDWriteFontFace3
**fontface
);
402 HRESULT CreateFontFaceWithSimulations
(DWRITE_FONT_SIMULATIONS simulations
,
403 IDWriteFontFace3
**fontface
);
404 BOOL Equals
(IDWriteFontFaceReference
*reference
);
405 UINT32 GetFontFaceIndex
();
406 DWRITE_FONT_SIMULATIONS GetSimulations
();
407 HRESULT GetFontFile
(IDWriteFontFile
**fontfile
);
408 UINT64 GetLocalFileSize
();
409 UINT64 GetFileSize
();
410 HRESULT GetFileTime
(FILETIME
*writetime
);
411 DWRITE_LOCALITY GetLocality
();
412 HRESULT EnqueueFontDownloadRequest
();
413 HRESULT EnqueueCharacterDownloadRequest
(WCHAR
const *chars
, UINT32 count
);
414 HRESULT EnqueueGlyphDownloadRequest
(UINT16
const *glyphs
, UINT32 count
);
415 HRESULT EnqueueFileFragmentDownloadRequest
(UINT64 offset
, UINT64 size
);
421 uuid(c081fe77
-2fd1
-41ac
-a5a3
-34983c4ba61a
)
423 interface IDWriteFontFaceReference1
: IDWriteFontFaceReference
425 HRESULT CreateFontFace
(IDWriteFontFace5
**fontface
);
426 UINT32 GetFontAxisValueCount
();
427 HRESULT GetFontAxisValues
(
428 DWRITE_FONT_AXIS_VALUE
*values
,
435 uuid(da20d8ef
-812a
-4c43
-9802-62ec4abd7ade
)
437 interface IDWriteFontList1
: IDWriteFontList
439 DWRITE_LOCALITY GetFontLocality
(UINT32 index
);
440 HRESULT GetFont
(UINT32 index
, IDWriteFont3
**font
);
441 HRESULT GetFontFaceReference
(UINT32 index
, IDWriteFontFaceReference
**reference
);
447 uuid(c0763a34
-77af
-445a
-b735
-08c37b0a5bf5
)
449 interface IDWriteFontList2
: IDWriteFontList1
451 HRESULT GetFontSet
(IDWriteFontSet1
**fontset
);
457 uuid(dc7ead19
-e54c
-43af
-b2da
-4e2b79ba3f7f
)
459 interface IDWriteFontSet2
: IDWriteFontSet1
461 HANDLE GetExpirationEvent
();
467 uuid(7c073ef2
-a7f4
-4045-8c32
-8ab8ae640f90
)
469 interface IDWriteFontSet3
: IDWriteFontSet2
471 DWRITE_FONT_SOURCE_TYPE GetFontSourceType
(UINT32 index
);
472 UINT32 GetFontSourceNameLength
(UINT32 index
);
473 HRESULT GetFontSourceName
(UINT32 index
, WCHAR
*buffer
, UINT32 buffer_size
);
479 uuid(eec175fc
-bea9
-4c86
-8b53
-ccbdd7df0c82
)
481 interface IDWriteFontSet4
: IDWriteFontSet3
483 UINT32 ConvertWeightStretchStyleToFontAxisValues
(
484 DWRITE_FONT_AXIS_VALUE
const *input_axis_values
,
485 UINT32 input_axis_count
,
486 DWRITE_FONT_WEIGHT weight
,
487 DWRITE_FONT_STRETCH stretch
,
488 DWRITE_FONT_STYLE style
,
490 DWRITE_FONT_AXIS_VALUE
*output_axis_values
);
491 HRESULT GetMatchingFonts
(
492 WCHAR
const *family_name
,
493 DWRITE_FONT_AXIS_VALUE
const *axis_values
,
494 UINT32 axis_value_count
,
495 DWRITE_FONT_SIMULATIONS allowed_simulations
,
496 IDWriteFontSet4
**fonts
);
502 uuid(d37d7598
-09be
-4222-a236
-2081341cc1f2
)
504 interface IDWriteFontFace3
: IDWriteFontFace2
506 HRESULT GetFontFaceReference
(IDWriteFontFaceReference
**reference
);
507 void GetPanose
(DWRITE_PANOSE
*panose
);
508 DWRITE_FONT_WEIGHT GetWeight
();
509 DWRITE_FONT_STRETCH GetStretch
();
510 DWRITE_FONT_STYLE GetStyle
();
511 HRESULT GetFamilyNames
(IDWriteLocalizedStrings
**names
);
512 HRESULT GetFaceNames
(IDWriteLocalizedStrings
**names
);
513 HRESULT GetInformationalStrings
(DWRITE_INFORMATIONAL_STRING_ID stringid
,
514 IDWriteLocalizedStrings
**strings
,
516 BOOL HasCharacter
(UINT32 character
);
517 HRESULT GetRecommendedRenderingMode
(
521 DWRITE_MATRIX
const *transform
,
523 DWRITE_OUTLINE_THRESHOLD threshold
,
524 DWRITE_MEASURING_MODE measuring_mode
,
525 IDWriteRenderingParams
*params
,
526 DWRITE_RENDERING_MODE1
*rendering_mode
,
527 DWRITE_GRID_FIT_MODE
*gridfit_mode
);
528 BOOL IsCharacterLocal
(UINT32 character
);
529 BOOL IsGlyphLocal
(UINT16 glyph
);
530 HRESULT AreCharactersLocal
(WCHAR
const *characters
,
531 UINT32 count
, BOOL enqueue_if_not
, BOOL
*are_local
);
532 HRESULT AreGlyphsLocal
(UINT16
const *glyphs
, UINT32 count
,
533 BOOL enqueue_if_not
, BOOL
*are_local
);
537 typedef struct DWRITE_LINE_METRICS1
540 UINT32 trailingWhitespaceLength
;
541 UINT32 newlineLength
;
547 } DWRITE_LINE_METRICS1
;
549 typedef enum DWRITE_FONT_LINE_GAP_USAGE
551 DWRITE_FONT_LINE_GAP_USAGE_DEFAULT
,
552 DWRITE_FONT_LINE_GAP_USAGE_DISABLED
,
553 DWRITE_FONT_LINE_GAP_USAGE_ENABLED
554 } DWRITE_FONT_LINE_GAP_USAGE
;
556 typedef struct DWRITE_LINE_SPACING
558 DWRITE_LINE_SPACING_METHOD method
;
562 DWRITE_FONT_LINE_GAP_USAGE fontLineGapUsage
;
563 } DWRITE_LINE_SPACING
;
568 uuid(f67e0edd
-9e3d
-4ecc
-8c32
-4183253dfe70
)
570 interface IDWriteTextFormat2
: IDWriteTextFormat1
572 HRESULT SetLineSpacing
(DWRITE_LINE_SPACING
const *spacing
);
573 HRESULT GetLineSpacing
(DWRITE_LINE_SPACING
*spacing
);
579 uuid(6d3b5641
-e550
-430d
-a85b
-b7bf48a93427
)
581 interface IDWriteTextFormat3
: IDWriteTextFormat2
583 HRESULT SetFontAxisValues
(
584 DWRITE_FONT_AXIS_VALUE
const *axis_values
,
586 UINT32 GetFontAxisValueCount
();
587 HRESULT GetFontAxisValues
(
588 DWRITE_FONT_AXIS_VALUE
*axis_values
,
590 DWRITE_AUTOMATIC_FONT_AXES GetAutomaticFontAxes
();
591 HRESULT SetAutomaticFontAxes
(DWRITE_AUTOMATIC_FONT_AXES axes
);
597 uuid(07ddcd52
-020e-4de8
-ac33
-6c953d83f92d
)
599 interface IDWriteTextLayout3
: IDWriteTextLayout2
601 HRESULT InvalidateLayout
();
602 HRESULT SetLineSpacing
(DWRITE_LINE_SPACING
const *spacing
);
603 HRESULT GetLineSpacing
(DWRITE_LINE_SPACING
*spacing
);
604 HRESULT GetLineMetrics
(DWRITE_LINE_METRICS1
*metrics
, UINT32 max_count
, UINT32
*count
);
610 uuid(05a9bf42
-223f
-4441-b5fb
-8263685f55e9
)
612 interface IDWriteTextLayout4
: IDWriteTextLayout3
614 HRESULT SetFontAxisValues
(
615 DWRITE_FONT_AXIS_VALUE
const *axis_values
,
617 DWRITE_TEXT_RANGE
range);
618 UINT32 GetFontAxisValueCount
(UINT32 pos
);
619 HRESULT GetFontAxisValues
(
621 DWRITE_FONT_AXIS_VALUE
*values
,
623 DWRITE_TEXT_RANGE
*range);
624 DWRITE_AUTOMATIC_FONT_AXES GetAutomaticFontAxes
();
625 HRESULT SetAutomaticFontAxes
(DWRITE_AUTOMATIC_FONT_AXES axes
);
631 uuid(2397599d
-dd0d
-4681-bd6a
-f4f31eaade77
)
633 interface IDWriteFontFallback1
: IDWriteFontFallback
635 HRESULT MapCharacters
(
636 IDWriteTextAnalysisSource
*source,
639 IDWriteFontCollection
*base_collection
,
640 const WCHAR
*familyname
,
641 DWRITE_FONT_AXIS_VALUE
const *axis_values
,
643 UINT32
*mapped_length
,
645 IDWriteFontFace5
**fontface
);
651 uuid(4556be70
-3abd
-4f70
-90be
-421780a6f515
)
653 interface IDWriteGdiInterop1
: IDWriteGdiInterop
655 HRESULT CreateFontFromLOGFONT
(LOGFONTW
const *logfont
,
656 IDWriteFontCollection
*collection
,
659 /* GetFontSignature() methods are listed in reversed order to make
660 resulting vtable order compatible. */
661 HRESULT GetFontSignature_
(IDWriteFontFace
*fontface
, FONTSIGNATURE
*fontsig
);
662 HRESULT GetFontSignature
(IDWriteFont
*font
, FONTSIGNATURE
*fontsig
);
663 HRESULT GetMatchingFontsByLOGFONT
(LOGFONTW
const *logfont
,
664 IDWriteFontSet
*fontset
,
665 IDWriteFontSet
**subset
);
671 uuid(2f642afe
-9c68
-4f40
-b8be
-457401afcb3d
)
673 interface IDWriteFontSetBuilder
: IUnknown
675 HRESULT AddFontFaceReference_
(IDWriteFontFaceReference
*ref,
676 DWRITE_FONT_PROPERTY
const *props
,
678 HRESULT AddFontFaceReference
(IDWriteFontFaceReference
*ref);
679 HRESULT AddFontSet
(IDWriteFontSet
*fontset
);
680 HRESULT CreateFontSet
(IDWriteFontSet
**fontset
);
686 uuid(3ff7715f
-3cdc
-4dc6
-9b72
-ec5621dccafd
)
688 interface IDWriteFontSetBuilder1
: IDWriteFontSetBuilder
690 HRESULT AddFontFile
(IDWriteFontFile
*file
);
696 uuid(ee5ba612
-b131
-463c
-8f4f
-3189b9401e45
)
698 interface IDWriteFontSetBuilder2
: IDWriteFontSetBuilder1
701 IDWriteFontFile
*fontfile
,
703 DWRITE_FONT_SIMULATIONS simulations
,
704 DWRITE_FONT_AXIS_VALUE
const *axis_values
,
706 DWRITE_FONT_AXIS_RANGE
const *axis_ranges
,
708 DWRITE_FONT_PROPERTY
const *props
,
709 UINT32 num_properties
);
710 HRESULT AddFontFile
(const WCHAR
*filepath
);
716 uuid(9a1b41c3
-d3bb
-466a
-87fc
-fe67556a3b65
)
718 interface IDWriteFactory3
: IDWriteFactory2
720 HRESULT CreateGlyphRunAnalysis
(
721 DWRITE_GLYPH_RUN
const *run
,
722 DWRITE_MATRIX
const *transform
,
723 DWRITE_RENDERING_MODE1 rendering_mode
,
724 DWRITE_MEASURING_MODE measuring_mode
,
725 DWRITE_GRID_FIT_MODE gridfit_mode
,
726 DWRITE_TEXT_ANTIALIAS_MODE antialias_mode
,
729 IDWriteGlyphRunAnalysis
**analysis
);
731 HRESULT CreateCustomRenderingParams
(
733 FLOAT enhanced_contrast
,
734 FLOAT grayscale_enhanced_contrast
,
735 FLOAT cleartype_level
,
736 DWRITE_PIXEL_GEOMETRY pixel_geometry
,
737 DWRITE_RENDERING_MODE1 rendering_mode
,
738 DWRITE_GRID_FIT_MODE gridfit_mode
,
739 IDWriteRenderingParams3
**params
);
741 /* CreateFontFaceReference methods are listed in reversed order to make
742 resulting vtable order compatible. */
743 HRESULT CreateFontFaceReference_
(
744 IDWriteFontFile
*file
,
746 DWRITE_FONT_SIMULATIONS simulations
,
747 IDWriteFontFaceReference
**reference
);
749 HRESULT CreateFontFaceReference
(
751 FILETIME
const *writetime
,
753 DWRITE_FONT_SIMULATIONS simulations
,
754 IDWriteFontFaceReference
**reference
);
756 HRESULT GetSystemFontSet
(IDWriteFontSet
**fontset
);
757 HRESULT CreateFontSetBuilder
(IDWriteFontSetBuilder
**builder
);
758 HRESULT CreateFontCollectionFromFontSet
(
759 IDWriteFontSet
*fontset
,
760 IDWriteFontCollection1
**collection
);
762 HRESULT GetSystemFontCollection
(
763 BOOL include_downloadable
,
764 IDWriteFontCollection1
**collection
,
765 BOOL check_for_updates
);
767 HRESULT GetFontDownloadQueue
(IDWriteFontDownloadQueue
**queue
);
770 typedef struct DWRITE_GLYPH_IMAGE_DATA
772 void const *imageData
;
773 UINT32 imageDataSize
;
776 D2D1_SIZE_U pixelSize
;
777 D2D1_POINT_2L horizontalLeftOrigin
;
778 D2D1_POINT_2L horizontalRightOrigin
;
779 D2D1_POINT_2L verticalTopOrigin
;
780 D2D1_POINT_2L verticalBottomOrigin
;
781 } DWRITE_GLYPH_IMAGE_DATA
;
786 uuid(27f2a904
-4eb8
-441d
-9678-0563f53e3e2f
)
788 interface IDWriteFontFace4
: IDWriteFontFace3
790 HRESULT GetGlyphImageFormats_
(
794 DWRITE_GLYPH_IMAGE_FORMATS
*formats
);
795 DWRITE_GLYPH_IMAGE_FORMATS GetGlyphImageFormats
();
796 HRESULT GetGlyphImageData
(
799 DWRITE_GLYPH_IMAGE_FORMATS format
,
800 DWRITE_GLYPH_IMAGE_DATA
*data
,
802 void ReleaseGlyphImageData
(void *context
);
808 uuid(98eff3a5
-b667
-479a
-b145
-e2fa5b9fdc29
)
810 interface IDWriteFontFace5
: IDWriteFontFace4
812 UINT32 GetFontAxisValueCount
();
813 HRESULT GetFontAxisValues
(
814 DWRITE_FONT_AXIS_VALUE
*values
,
816 BOOL HasVariations
();
817 HRESULT GetFontResource
(IDWriteFontResource
**resource
);
818 BOOL Equals
(IDWriteFontFace
*fontface
);
824 uuid(c4b1fe1b
-6e84
-47d5
-b54c
-a597981b06ad
)
826 interface IDWriteFontFace6
: IDWriteFontFace5
828 HRESULT GetFamilyNames
(
829 DWRITE_FONT_FAMILY_MODEL font_family_model
,
830 IDWriteLocalizedStrings
**names
);
831 HRESULT GetFaceNames
(
832 DWRITE_FONT_FAMILY_MODEL font_family_model
,
833 IDWriteLocalizedStrings
**names
);
836 typedef struct DWRITE_COLOR_GLYPH_RUN1 DWRITE_COLOR_GLYPH_RUN1
;
838 cpp_quote
("struct DWRITE_COLOR_GLYPH_RUN1")
840 cpp_quote
(" DWRITE_GLYPH_RUN glyphRun;")
841 cpp_quote
(" DWRITE_GLYPH_RUN_DESCRIPTION *glyphRunDescription;")
842 cpp_quote
(" FLOAT baselineOriginX;")
843 cpp_quote
(" FLOAT baselineOriginY;")
844 cpp_quote
(" DWRITE_COLOR_F runColor;")
845 cpp_quote
(" UINT16 paletteIndex;")
846 cpp_quote
("#ifdef _WIN64")
847 cpp_quote
(" UINT32 _pad;")
849 cpp_quote
(" DWRITE_GLYPH_IMAGE_FORMATS glyphImageFormat;")
850 cpp_quote
(" DWRITE_MEASURING_MODE measuringMode;")
856 uuid(7c5f86da
-c7a1
-4f05
-b8e1
-55a179fe5a35
)
858 interface IDWriteColorGlyphRunEnumerator1
: IDWriteColorGlyphRunEnumerator
860 HRESULT GetCurrentRun
(
861 DWRITE_COLOR_GLYPH_RUN1
const **run
);
867 uuid(4b0b5bd3
-0797-4549-8ac5
-fe915cc53856
)
869 interface IDWriteFactory4
: IDWriteFactory3
871 HRESULT TranslateColorGlyphRun
(
872 D2D1_POINT_2F baseline_origin
,
873 DWRITE_GLYPH_RUN
const *run
,
874 DWRITE_GLYPH_RUN_DESCRIPTION
const *run_desc
,
875 DWRITE_GLYPH_IMAGE_FORMATS desired_formats
,
876 DWRITE_MEASURING_MODE measuring_mode
,
877 DWRITE_MATRIX
const *transform
,
879 IDWriteColorGlyphRunEnumerator1
**layers
);
881 HRESULT ComputeGlyphOrigins_
(
882 DWRITE_GLYPH_RUN
const *run
,
883 D2D1_POINT_2F baseline_origin
,
884 D2D1_POINT_2F
*origins
);
886 HRESULT ComputeGlyphOrigins
(
887 DWRITE_GLYPH_RUN
const *run
,
888 DWRITE_MEASURING_MODE measuring_mode
,
889 D2D1_POINT_2F baseline_origin
,
890 DWRITE_MATRIX
const *transform
,
891 D2D1_POINT_2F
*origins
);
897 uuid(ce25f8fd
-863b
-4d13
-9651-c1f88dc73fe2
)
899 interface IDWriteAsyncResult
: IUnknown
901 HANDLE GetWaitHandle
();
905 typedef struct DWRITE_FILE_FRAGMENT
909 } DWRITE_FILE_FRAGMENT
;
914 uuid(4db3757a
-2c72
-4ed9
-b2b6
-1ababe1aff9c
)
916 interface IDWriteRemoteFontFileStream
: IDWriteFontFileStream
918 HRESULT GetLocalFileSize
(UINT64
*size
);
919 HRESULT GetFileFragmentLocality
(UINT64 offset
, UINT64 size
, BOOL
*is_local
, UINT64
*partial_size
);
920 DWRITE_LOCALITY GetLocality
();
921 HRESULT BeginDownload
(
922 GUID
const *operation_id
,
923 DWRITE_FILE_FRAGMENT
const *fragments
,
924 UINT32 fragment_count
,
925 IDWriteAsyncResult
**async_result
);
928 typedef enum DWRITE_CONTAINER_TYPE
930 DWRITE_CONTAINER_TYPE_UNKNOWN
,
931 DWRITE_CONTAINER_TYPE_WOFF
,
932 DWRITE_CONTAINER_TYPE_WOFF2
,
933 } DWRITE_CONTAINER_TYPE
;
938 uuid(68648c83
-6ede
-46c0
-ab46
-20083a887fde
)
940 interface IDWriteRemoteFontFileLoader
: IDWriteFontFileLoader
942 HRESULT CreateRemoteStreamFromKey
(void const *key
, UINT32 key_size
, IDWriteRemoteFontFileStream
**stream
);
943 HRESULT GetLocalityFromKey
(void const *key
, UINT32 key_size
, DWRITE_LOCALITY
*locality
);
944 HRESULT CreateFontFileReferenceFromUrl
(
945 IDWriteFactory
*factory
,
946 WCHAR
const *base_url
,
947 WCHAR
const *file_url
,
948 IDWriteFontFile
**fontfile
);
954 uuid(dc102f47
-a12d
-4b1c
-822d
-9e117e33043f
)
956 interface IDWriteInMemoryFontFileLoader
: IDWriteFontFileLoader
958 HRESULT CreateInMemoryFontFileReference
(
959 IDWriteFactory
*factory
,
963 IDWriteFontFile
**fontfile
);
964 UINT32 GetFileCount
();
970 uuid(958db99a
-be2a
-4f09
-af7d
-65189803d1d3
)
972 interface IDWriteFactory5
: IDWriteFactory4
974 HRESULT CreateFontSetBuilder
(IDWriteFontSetBuilder1
**fontset_builder
);
975 HRESULT CreateInMemoryFontFileLoader
(IDWriteInMemoryFontFileLoader
**loader
);
976 HRESULT CreateHttpFontFileLoader
(
977 WCHAR
const *referrer_url
,
978 WCHAR
const *extra_headers
,
979 IDWriteRemoteFontFileLoader
**loader
);
980 DWRITE_CONTAINER_TYPE AnalyzeContainerType
(void const *data
, UINT32 data_size
);
981 HRESULT UnpackFontFile
(
982 DWRITE_CONTAINER_TYPE container_type
,
985 IDWriteFontFileStream
**stream
);
991 uuid(f3744d80
-21f7
-42eb
-b35d
-995bc72fc223
)
993 interface IDWriteFactory6
: IDWriteFactory5
995 HRESULT CreateFontFaceReference
(
996 IDWriteFontFile
*file
,
998 DWRITE_FONT_SIMULATIONS simulations
,
999 DWRITE_FONT_AXIS_VALUE
const *axis_values
,
1001 IDWriteFontFaceReference1
**face_ref
);
1002 HRESULT CreateFontResource
(
1003 IDWriteFontFile
*file
,
1005 IDWriteFontResource
**resource
);
1006 HRESULT GetSystemFontSet
(
1007 BOOL include_downloadable
,
1008 IDWriteFontSet1
**fontset
);
1009 HRESULT GetSystemFontCollection
(
1010 BOOL include_downloadable
,
1011 DWRITE_FONT_FAMILY_MODEL family_model
,
1012 IDWriteFontCollection2
**collection
);
1013 HRESULT CreateFontCollectionFromFontSet
(
1014 IDWriteFontSet
*fontset
,
1015 DWRITE_FONT_FAMILY_MODEL family_model
,
1016 IDWriteFontCollection2
**collection
);
1017 HRESULT CreateFontSetBuilder
(
1018 IDWriteFontSetBuilder2
**builder
);
1019 HRESULT CreateTextFormat
(
1020 const WCHAR
*familyname
,
1021 IDWriteFontCollection
*collection
,
1022 DWRITE_FONT_AXIS_VALUE
const *axis_values
,
1025 const WCHAR
*localename
,
1026 IDWriteTextFormat3
**format
);
1032 uuid(35d0e0b3
-9076-4d2e
-a016
-a91b568a06b4
)
1034 interface IDWriteFactory7
: IDWriteFactory6
1036 HRESULT GetSystemFontSet
(
1037 BOOL include_downloadable
,
1038 IDWriteFontSet2
**fontset
);
1039 HRESULT GetSystemFontCollection
(
1040 BOOL include_downloadable
,
1041 DWRITE_FONT_FAMILY_MODEL family_model
,
1042 IDWriteFontCollection3
**collection
);