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
const *values
,
224 HRESULT GetFontAxisRanges
(
225 DWRITE_FONT_AXIS_RANGE
const *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(d37d7598
-09be
-4222-a236
-2081341cc1f2
)
481 interface IDWriteFontFace3
: IDWriteFontFace2
483 HRESULT GetFontFaceReference
(IDWriteFontFaceReference
**reference
);
484 void GetPanose
(DWRITE_PANOSE
*panose
);
485 DWRITE_FONT_WEIGHT GetWeight
();
486 DWRITE_FONT_STRETCH GetStretch
();
487 DWRITE_FONT_STYLE GetStyle
();
488 HRESULT GetFamilyNames
(IDWriteLocalizedStrings
**names
);
489 HRESULT GetFaceNames
(IDWriteLocalizedStrings
**names
);
490 HRESULT GetInformationalStrings
(DWRITE_INFORMATIONAL_STRING_ID stringid
,
491 IDWriteLocalizedStrings
**strings
,
493 BOOL HasCharacter
(UINT32 character
);
494 HRESULT GetRecommendedRenderingMode
(
498 DWRITE_MATRIX
const *transform
,
500 DWRITE_OUTLINE_THRESHOLD threshold
,
501 DWRITE_MEASURING_MODE measuring_mode
,
502 IDWriteRenderingParams
*params
,
503 DWRITE_RENDERING_MODE1
*rendering_mode
,
504 DWRITE_GRID_FIT_MODE
*gridfit_mode
);
505 BOOL IsCharacterLocal
(UINT32 character
);
506 BOOL IsGlyphLocal
(UINT16 glyph
);
507 HRESULT AreCharactersLocal
(WCHAR
const *characters
,
508 UINT32 count
, BOOL enqueue_if_not
, BOOL
*are_local
);
509 HRESULT AreGlyphsLocal
(UINT16
const *glyphs
, UINT32 count
,
510 BOOL enqueue_if_not
, BOOL
*are_local
);
514 typedef struct DWRITE_LINE_METRICS1
517 UINT32 trailingWhitespaceLength
;
518 UINT32 newlineLength
;
524 } DWRITE_LINE_METRICS1
;
526 typedef enum DWRITE_FONT_LINE_GAP_USAGE
528 DWRITE_FONT_LINE_GAP_USAGE_DEFAULT
,
529 DWRITE_FONT_LINE_GAP_USAGE_DISABLED
,
530 DWRITE_FONT_LINE_GAP_USAGE_ENABLED
531 } DWRITE_FONT_LINE_GAP_USAGE
;
533 typedef struct DWRITE_LINE_SPACING
535 DWRITE_LINE_SPACING_METHOD method
;
539 DWRITE_FONT_LINE_GAP_USAGE fontLineGapUsage
;
540 } DWRITE_LINE_SPACING
;
545 uuid(f67e0edd
-9e3d
-4ecc
-8c32
-4183253dfe70
)
547 interface IDWriteTextFormat2
: IDWriteTextFormat1
549 HRESULT SetLineSpacing
(DWRITE_LINE_SPACING
const *spacing
);
550 HRESULT GetLineSpacing
(DWRITE_LINE_SPACING
*spacing
);
556 uuid(6d3b5641
-e550
-430d
-a85b
-b7bf48a93427
)
558 interface IDWriteTextFormat3
: IDWriteTextFormat2
560 HRESULT SetFontAxisValues
(
561 DWRITE_FONT_AXIS_VALUE
const *axis_values
,
563 UINT32 GetFontAxisValueCount
();
564 HRESULT GetFontAxisValues
(
565 DWRITE_FONT_AXIS_VALUE
const *axis_values
,
567 DWRITE_AUTOMATIC_FONT_AXES GetAutomaticFontAxes
();
568 HRESULT SetAutomaticFontAxes
(DWRITE_AUTOMATIC_FONT_AXES axes
);
574 uuid(07ddcd52
-020e-4de8
-ac33
-6c953d83f92d
)
576 interface IDWriteTextLayout3
: IDWriteTextLayout2
578 HRESULT InvalidateLayout
();
579 HRESULT SetLineSpacing
(DWRITE_LINE_SPACING
const *spacing
);
580 HRESULT GetLineSpacing
(DWRITE_LINE_SPACING
*spacing
);
581 HRESULT GetLineMetrics
(DWRITE_LINE_METRICS1
*metrics
, UINT32 max_count
, UINT32
*count
);
587 uuid(05a9bf42
-223f
-4441-b5fb
-8263685f55e9
)
589 interface IDWriteTextLayout4
: IDWriteTextLayout3
591 HRESULT SetFontAxisValues
(
592 DWRITE_FONT_AXIS_VALUE
const *axis_values
,
594 DWRITE_TEXT_RANGE
range);
595 UINT32 GetFontAxisValueCount
(UINT32 pos
);
596 HRESULT GetFontAxisValues
(
598 DWRITE_FONT_AXIS_VALUE
*values
,
600 DWRITE_TEXT_RANGE
*range);
601 DWRITE_AUTOMATIC_FONT_AXES GetAutomaticFontAxes
();
602 HRESULT SetAutomaticFontAxes
(DWRITE_AUTOMATIC_FONT_AXES axes
);
608 uuid(2397599d
-dd0d
-4681-bd6a
-f4f31eaade77
)
610 interface IDWriteFontFallback1
: IDWriteFontFallback
612 HRESULT MapCharacters
(
613 IDWriteTextAnalysisSource
*source,
616 IDWriteFontCollection
*base_collection
,
617 const WCHAR
*familyname
,
618 DWRITE_FONT_AXIS_VALUE
const *axis_values
,
620 UINT32
*mapped_length
,
622 IDWriteFontFace5
**fontface
);
628 uuid(4556be70
-3abd
-4f70
-90be
-421780a6f515
)
630 interface IDWriteGdiInterop1
: IDWriteGdiInterop
632 HRESULT CreateFontFromLOGFONT
(LOGFONTW
const *logfont
,
633 IDWriteFontCollection
*collection
,
636 /* GetFontSignature() methods are listed in reversed order to make
637 resulting vtable order compatible. */
638 HRESULT GetFontSignature_
(IDWriteFontFace
*fontface
, FONTSIGNATURE
*fontsig
);
639 HRESULT GetFontSignature
(IDWriteFont
*font
, FONTSIGNATURE
*fontsig
);
640 HRESULT GetMatchingFontsByLOGFONT
(LOGFONTW
const *logfont
,
641 IDWriteFontSet
*fontset
,
642 IDWriteFontSet
**subset
);
648 uuid(2f642afe
-9c68
-4f40
-b8be
-457401afcb3d
)
650 interface IDWriteFontSetBuilder
: IUnknown
652 HRESULT AddFontFaceReference_
(IDWriteFontFaceReference
*ref,
653 DWRITE_FONT_PROPERTY
const *props
,
655 HRESULT AddFontFaceReference
(IDWriteFontFaceReference
*ref);
656 HRESULT AddFontSet
(IDWriteFontSet
*fontset
);
657 HRESULT CreateFontSet
(IDWriteFontSet
**fontset
);
663 uuid(3ff7715f
-3cdc
-4dc6
-9b72
-ec5621dccafd
)
665 interface IDWriteFontSetBuilder1
: IDWriteFontSetBuilder
667 HRESULT AddFontFile
(IDWriteFontFile
*file
);
673 uuid(ee5ba612
-b131
-463c
-8f4f
-3189b9401e45
)
675 interface IDWriteFontSetBuilder2
: IDWriteFontSetBuilder1
678 IDWriteFontFile
*fontfile
,
680 DWRITE_FONT_SIMULATIONS simulations
,
681 DWRITE_FONT_AXIS_VALUE
const *axis_values
,
683 DWRITE_FONT_AXIS_RANGE
const *axis_ranges
,
685 DWRITE_FONT_PROPERTY
const *props
,
686 UINT32 num_properties
);
687 HRESULT AddFontFile
(const WCHAR
*filepath
);
693 uuid(9a1b41c3
-d3bb
-466a
-87fc
-fe67556a3b65
)
695 interface IDWriteFactory3
: IDWriteFactory2
697 HRESULT CreateGlyphRunAnalysis
(
698 DWRITE_GLYPH_RUN
const *run
,
699 DWRITE_MATRIX
const *transform
,
700 DWRITE_RENDERING_MODE1 rendering_mode
,
701 DWRITE_MEASURING_MODE measuring_mode
,
702 DWRITE_GRID_FIT_MODE gridfit_mode
,
703 DWRITE_TEXT_ANTIALIAS_MODE antialias_mode
,
706 IDWriteGlyphRunAnalysis
**analysis
);
708 HRESULT CreateCustomRenderingParams
(
710 FLOAT enhanced_contrast
,
711 FLOAT grayscale_enhanced_contrast
,
712 FLOAT cleartype_level
,
713 DWRITE_PIXEL_GEOMETRY pixel_geometry
,
714 DWRITE_RENDERING_MODE1 rendering_mode
,
715 DWRITE_GRID_FIT_MODE gridfit_mode
,
716 IDWriteRenderingParams3
**params
);
718 /* CreateFontFaceReference methods are listed in reversed order to make
719 resulting vtable order compatible. */
720 HRESULT CreateFontFaceReference_
(
721 IDWriteFontFile
*file
,
723 DWRITE_FONT_SIMULATIONS simulations
,
724 IDWriteFontFaceReference
**reference
);
726 HRESULT CreateFontFaceReference
(
728 FILETIME
const *writetime
,
730 DWRITE_FONT_SIMULATIONS simulations
,
731 IDWriteFontFaceReference
**reference
);
733 HRESULT GetSystemFontSet
(IDWriteFontSet
**fontset
);
734 HRESULT CreateFontSetBuilder
(IDWriteFontSetBuilder
**builder
);
735 HRESULT CreateFontCollectionFromFontSet
(
736 IDWriteFontSet
*fontset
,
737 IDWriteFontCollection1
**collection
);
739 HRESULT GetSystemFontCollection
(
740 BOOL include_downloadable
,
741 IDWriteFontCollection1
**collection
,
742 BOOL check_for_updates
);
744 HRESULT GetFontDownloadQueue
(IDWriteFontDownloadQueue
**queue
);
747 typedef struct DWRITE_GLYPH_IMAGE_DATA
749 void const *imageData
;
750 UINT32 imageDataSize
;
753 D2D1_SIZE_U pixelSize
;
754 D2D1_POINT_2L horizontalLeftOrigin
;
755 D2D1_POINT_2L horizontalRightOrigin
;
756 D2D1_POINT_2L verticalTopOrigin
;
757 D2D1_POINT_2L verticalBottomOrigin
;
758 } DWRITE_GLYPH_IMAGE_DATA
;
763 uuid(27f2a904
-4eb8
-441d
-9678-0563f53e3e2f
)
765 interface IDWriteFontFace4
: IDWriteFontFace3
767 HRESULT GetGlyphImageFormats_
(
771 DWRITE_GLYPH_IMAGE_FORMATS
*formats
);
772 DWRITE_GLYPH_IMAGE_FORMATS GetGlyphImageFormats
();
773 HRESULT GetGlyphImageData
(
776 DWRITE_GLYPH_IMAGE_FORMATS format
,
777 DWRITE_GLYPH_IMAGE_DATA
*data
,
779 void ReleaseGlyphImageData
(void *context
);
785 uuid(98eff3a5
-b667
-479a
-b145
-e2fa5b9fdc29
)
787 interface IDWriteFontFace5
: IDWriteFontFace4
789 UINT32 GetFontAxisValueCount
();
790 HRESULT GetFontAxisValues
(
791 DWRITE_FONT_AXIS_VALUE
*values
,
793 BOOL HasVariations
();
794 HRESULT GetFontResource
(IDWriteFontResource
**resource
);
795 BOOL Equals
(IDWriteFontFace
*fontface
);
798 typedef struct DWRITE_COLOR_GLYPH_RUN1
800 DWRITE_GLYPH_RUN glyphRun
;
801 DWRITE_GLYPH_RUN_DESCRIPTION
*glyphRunDescription
;
802 FLOAT baselineOriginX
;
803 FLOAT baselineOriginY
;
804 DWRITE_COLOR_F runColor
;
806 DWRITE_GLYPH_IMAGE_FORMATS glyphImageFormat
;
807 DWRITE_MEASURING_MODE measuringMode
;
808 } DWRITE_COLOR_GLYPH_RUN1
;
813 uuid(7c5f86da
-c7a1
-4f05
-b8e1
-55a179fe5a35
)
815 interface IDWriteColorGlyphRunEnumerator1
: IDWriteColorGlyphRunEnumerator
817 HRESULT GetCurrentRun
(
818 DWRITE_COLOR_GLYPH_RUN1
const **run
);
824 uuid(4b0b5bd3
-0797-4549-8ac5
-fe915cc53856
)
826 interface IDWriteFactory4
: IDWriteFactory3
828 HRESULT TranslateColorGlyphRun
(
829 D2D1_POINT_2F baseline_origin
,
830 DWRITE_GLYPH_RUN
const *run
,
831 DWRITE_GLYPH_RUN_DESCRIPTION
const *run_desc
,
832 DWRITE_GLYPH_IMAGE_FORMATS desired_formats
,
833 DWRITE_MEASURING_MODE measuring_mode
,
834 DWRITE_MATRIX
const *transform
,
836 IDWriteColorGlyphRunEnumerator1
**layers
);
838 HRESULT ComputeGlyphOrigins_
(
839 DWRITE_GLYPH_RUN
const *run
,
840 D2D1_POINT_2F baseline_origin
,
841 D2D1_POINT_2F
*origins
);
843 HRESULT ComputeGlyphOrigins
(
844 DWRITE_GLYPH_RUN
const *run
,
845 DWRITE_MEASURING_MODE measuring_mode
,
846 D2D1_POINT_2F baseline_origin
,
847 DWRITE_MATRIX
const *transform
,
848 D2D1_POINT_2F
*origins
);
854 uuid(ce25f8fd
-863b
-4d13
-9651-c1f88dc73fe2
)
856 interface IDWriteAsyncResult
: IUnknown
858 HANDLE GetWaitHandle
();
862 typedef struct DWRITE_FILE_FRAGMENT
866 } DWRITE_FILE_FRAGMENT
;
871 uuid(4db3757a
-2c72
-4ed9
-b2b6
-1ababe1aff9c
)
873 interface IDWriteRemoteFontFileStream
: IDWriteFontFileStream
875 HRESULT GetLocalFileSize
(UINT64
*size
);
876 HRESULT GetFileFragmentLocality
(UINT64 offset
, UINT64 size
, BOOL
*is_local
, UINT64
*partial_size
);
877 DWRITE_LOCALITY GetLocality
();
878 HRESULT BeginDownload
(
879 GUID
const *operation_id
,
880 DWRITE_FILE_FRAGMENT
const *fragments
,
881 UINT32 fragment_count
,
882 IDWriteAsyncResult
**async_result
);
885 typedef enum DWRITE_CONTAINER_TYPE
887 DWRITE_CONTAINER_TYPE_UNKNOWN
,
888 DWRITE_CONTAINER_TYPE_WOFF
,
889 DWRITE_CONTAINER_TYPE_WOFF2
,
890 } DWRITE_CONTAINER_TYPE
;
895 uuid(68648c83
-6ede
-46c0
-ab46
-20083a887fde
)
897 interface IDWriteRemoteFontFileLoader
: IDWriteFontFileLoader
899 HRESULT CreateRemoteStreamFromKey
(void const *key
, UINT32 key_size
, IDWriteRemoteFontFileStream
**stream
);
900 HRESULT GetLocalityFromKey
(void const *key
, UINT32 key_size
, DWRITE_LOCALITY
*locality
);
901 HRESULT CreateFontFileReferenceFromUrl
(
902 IDWriteFactory
*factory
,
903 WCHAR
const *base_url
,
904 WCHAR
const *file_url
,
905 IDWriteFontFile
**fontfile
);
911 uuid(dc102f47
-a12d
-4b1c
-822d
-9e117e33043f
)
913 interface IDWriteInMemoryFontFileLoader
: IDWriteFontFileLoader
915 HRESULT CreateInMemoryFontFileReference
(
916 IDWriteFactory
*factory
,
920 IDWriteFontFile
**fontfile
);
921 UINT32 GetFileCount
();
927 uuid(958db99a
-be2a
-4f09
-af7d
-65189803d1d3
)
929 interface IDWriteFactory5
: IDWriteFactory4
931 HRESULT CreateFontSetBuilder
(IDWriteFontSetBuilder1
**fontset_builder
);
932 HRESULT CreateInMemoryFontFileLoader
(IDWriteInMemoryFontFileLoader
**loader
);
933 HRESULT CreateHttpFontFileLoader
(
934 WCHAR
const *referrer_url
,
935 WCHAR
const *extra_headers
,
936 IDWriteRemoteFontFileLoader
**loader
);
937 DWRITE_CONTAINER_TYPE AnalyzeContainerType
(void const *data
, UINT32 data_size
);
938 HRESULT UnpackFontFile
(
939 DWRITE_CONTAINER_TYPE container_type
,
942 IDWriteFontFileStream
**stream
);
948 uuid(f3744d80
-21f7
-42eb
-b35d
-995bc72fc223
)
950 interface IDWriteFactory6
: IDWriteFactory5
952 HRESULT CreateFontFaceReference
(
953 IDWriteFontFile
*file
,
955 DWRITE_FONT_SIMULATIONS simulations
,
956 DWRITE_FONT_AXIS_VALUE
const *axis_values
,
958 IDWriteFontFaceReference1
**face_ref
);
959 HRESULT CreateFontResource
(
960 IDWriteFontFile
*file
,
962 IDWriteFontResource
**resource
);
963 HRESULT GetSystemFontSet
(
964 BOOL include_downloadable
,
965 IDWriteFontSet1
**fontset
);
966 HRESULT GetSystemFontCollection
(
967 BOOL include_downloadable
,
968 DWRITE_FONT_FAMILY_MODEL family_model
,
969 IDWriteFontCollection2
**collection
);
970 HRESULT CreateFontCollectionFromFontSet
(
971 IDWriteFontSet
*fontset
,
972 DWRITE_FONT_FAMILY_MODEL family_model
,
973 IDWriteFontCollection2
**collection
);
974 HRESULT CreateFontSetBuilder
(
975 IDWriteFontSetBuilder2
**builder
);
976 HRESULT CreateTextFormat
(
977 const WCHAR
*familyname
,
978 IDWriteFontCollection
*collection
,
979 DWRITE_FONT_AXIS_VALUE
const *axis_values
,
982 const WCHAR
*localename
,
983 IDWriteTextFormat3
**format
);
989 uuid(35d0e0b3
-9076-4d2e
-a016
-a91b568a06b4
)
991 interface IDWriteFactory7
: IDWriteFactory6
993 HRESULT GetSystemFontSet
(
994 BOOL include_downloadable
,
995 IDWriteFontSet2
**fontset
);
996 HRESULT GetSystemFontCollection
(
997 BOOL include_downloadable
,
998 DWRITE_FONT_FAMILY_MODEL family_model
,
999 IDWriteFontCollection3
**collection
);