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_FAMILY_NAME
,
57 DWRITE_FONT_PROPERTY_ID_PREFERRED_FAMILY_NAME
,
58 DWRITE_FONT_PROPERTY_ID_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_TOTAL
69 } DWRITE_FONT_PROPERTY_ID
;
71 typedef struct DWRITE_FONT_PROPERTY
73 DWRITE_FONT_PROPERTY_ID propertyId
;
74 WCHAR
const *propertyValue
;
75 WCHAR
const *localeName
;
76 } DWRITE_FONT_PROPERTY
;
78 typedef enum DWRITE_FONT_AXIS_TAG
80 DWRITE_FONT_AXIS_TAG_WEIGHT
= 0x74686777, /* 'wght' */
81 DWRITE_FONT_AXIS_TAG_WIDTH
= 0x68746477, /* 'wdth' */
82 DWRITE_FONT_AXIS_TAG_SLANT
= 0x746e6c73, /* 'slnt' */
83 DWRITE_FONT_AXIS_TAG_OPTICAL_SIZE
= 0x7a73706f, /* 'opsz' */
84 DWRITE_FONT_AXIS_TAG_ITALIC
= 0x6c617469, /* 'ital' */
85 } DWRITE_FONT_AXIS_TAG
;
87 typedef enum DWRITE_FONT_SOURCE_TYPE
89 DWRITE_FONT_SOURCE_TYPE_UNKNOWN
,
90 DWRITE_FONT_SOURCE_TYPE_PER_MACHINE
,
91 DWRITE_FONT_SOURCE_TYPE_PER_USER
,
92 DWRITE_FONT_SOURCE_TYPE_APPX_PACKAGE
,
93 DWRITE_FONT_SOURCE_TYPE_REMOTE_FONT_PROVIDER
94 } DWRITE_FONT_SOURCE_TYPE
;
96 typedef struct DWRITE_FONT_AXIS_VALUE
98 DWRITE_FONT_AXIS_TAG axisTag
;
100 } DWRITE_FONT_AXIS_VALUE
;
102 typedef struct DWRITE_FONT_AXIS_RANGE
104 DWRITE_FONT_AXIS_TAG axisTag
;
107 } DWRITE_FONT_AXIS_RANGE
;
109 typedef enum DWRITE_AUTOMATIC_FONT_AXES
111 DWRITE_AUTOMATIC_FONT_AXES_NONE
,
112 DWRITE_AUTOMATIC_FONT_AXES_OPTICAL_SIZE
,
113 } DWRITE_AUTOMATIC_FONT_AXES
;
115 typedef enum DWRITE_FONT_AXIS_ATTRIBUTES
117 DWRITE_FONT_AXIS_ATTRIBUTES_NONE
,
118 DWRITE_FONT_AXIS_ATTRIBUTES_VARIABLE
,
119 DWRITE_FONT_AXIS_ATTRIBUTES_HIDDEN
,
120 } DWRITE_FONT_AXIS_ATTRIBUTES
;
122 typedef enum DWRITE_FONT_FAMILY_MODEL
124 DWRITE_FONT_FAMILY_MODEL_TYPOGRAPHIC
,
125 DWRITE_FONT_FAMILY_MODEL_WEIGHT_STRETCH_STYLE
,
126 } DWRITE_FONT_FAMILY_MODEL
;
131 uuid(b06fe5b9
-43ec
-4393-881b
-dbe4dc72fda7
)
133 interface IDWriteFontDownloadListener
: IUnknown
135 void DownloadCompleted
(IDWriteFontDownloadQueue
*queue
, IUnknown
*context
, HRESULT result
);
141 uuid(b71e6052
-5aea
-4fa3
-832e
-f60d431f7e91
)
143 interface IDWriteFontDownloadQueue
: IUnknown
145 HRESULT AddListener
(IDWriteFontDownloadListener
*listener
, UINT32
*token
);
146 HRESULT RemoveListener
(UINT32 token
);
148 HRESULT BeginDownload
(IUnknown
*context
);
149 HRESULT CancelDownload
();
150 UINT64 GetGenerationCount
();
156 uuid(b7924baa
-391b
-412a
-8c5c
-e44cc2d867dc
)
158 interface IDWriteRenderingParams3
: IDWriteRenderingParams2
160 DWRITE_RENDERING_MODE1 GetRenderingMode1
();
166 uuid(cfee3140
-1257-47ca
-8b85
-31bfcf3f2d0e
)
168 interface IDWriteStringList
: IUnknown
171 HRESULT GetLocaleNameLength
(UINT32 index
, UINT32
*length
);
172 HRESULT GetLocaleName
(UINT32 index
, WCHAR
*name
, UINT32 size
);
173 HRESULT GetStringLength
(UINT32 index
, UINT32
*length
);
174 HRESULT GetString
(UINT32 index
, WCHAR
*string, UINT32 size
);
180 uuid(53585141-d9f8
-4095-8321-d73cf6bd116b
)
182 interface IDWriteFontSet
: IUnknown
184 UINT32 GetFontCount
();
185 HRESULT GetFontFaceReference
(UINT32 index
, IDWriteFontFaceReference
**reference
);
186 HRESULT FindFontFaceReference
(IDWriteFontFaceReference
*reference
,
187 UINT32
*index
, BOOL
*exists
);
188 HRESULT FindFontFace
(IDWriteFontFace
*fontface
, UINT32
*index
, BOOL
*exists
);
189 HRESULT GetPropertyValues__
(DWRITE_FONT_PROPERTY_ID
id, IDWriteStringList
**values
);
190 HRESULT GetPropertyValues_
(DWRITE_FONT_PROPERTY_ID
id,
191 WCHAR
const *preferred_locales
, IDWriteStringList
**values
);
192 HRESULT GetPropertyValues
(UINT32 index
, DWRITE_FONT_PROPERTY_ID
id, BOOL
*exists
,
193 IDWriteLocalizedStrings
**values
);
194 HRESULT GetPropertyOccurrenceCount
(DWRITE_FONT_PROPERTY
const *property
, UINT32
*count
);
195 HRESULT GetMatchingFonts_
(WCHAR
const *family
, DWRITE_FONT_WEIGHT weight
, DWRITE_FONT_STRETCH stretch
,
196 DWRITE_FONT_STYLE style
, IDWriteFontSet
**fontset
);
197 HRESULT GetMatchingFonts
(DWRITE_FONT_PROPERTY
const *props
, UINT32 count
, IDWriteFontSet
**fontset
);
203 uuid(1f803a76
-6871-48e8
-987f
-b975551c50f2
)
205 interface IDWriteFontResource
: IUnknown
207 HRESULT GetFontFile
(IDWriteFontFile
**fontfile
);
208 UINT32 GetFontFaceIndex
();
209 UINT32 GetFontAxisCount
();
210 HRESULT GetDefaultFontAxisValues
(
211 DWRITE_FONT_AXIS_VALUE
const *values
,
213 HRESULT GetFontAxisRanges
(
214 DWRITE_FONT_AXIS_RANGE
const *ranges
,
216 DWRITE_FONT_AXIS_ATTRIBUTES GetFontAxisAttributes
(
218 HRESULT GetAxisNames
(
220 IDWriteLocalizedStrings
**names
);
221 UINT32 GetAxisValueNameCount
(
223 HRESULT GetAxisValueNames
(
226 DWRITE_FONT_AXIS_RANGE
*axis_range
,
227 IDWriteLocalizedStrings
**names
);
228 BOOL HasVariations
();
229 HRESULT CreateFontFace
(
230 DWRITE_FONT_SIMULATIONS simulations
,
231 DWRITE_FONT_AXIS_VALUE
const *axis_values
,
233 IDWriteFontFace5
**fontface
);
234 HRESULT CreateFontFaceReference
(
235 DWRITE_FONT_SIMULATIONS simulations
,
236 DWRITE_FONT_AXIS_VALUE
const *axis_values
,
238 IDWriteFontFaceReference1
**reference
);
244 uuid(7e9fda85
-6c92
-4053-bc47
-7ae3530db4d3
)
246 interface IDWriteFontSet1
: IDWriteFontSet
248 HRESULT GetMatchingFonts
(
249 DWRITE_FONT_PROPERTY
const *property
,
250 DWRITE_FONT_AXIS_VALUE
const *axis_values
,
252 IDWriteFontSet1
**fontset
);
253 HRESULT GetFirstFontResources
(IDWriteFontSet1
**fontset
);
254 HRESULT GetFilteredFonts__
(
255 UINT32
const *indices
,
257 IDWriteFontSet1
**fontset
);
258 HRESULT GetFilteredFonts_
(
259 DWRITE_FONT_AXIS_RANGE
const *axis_ranges
,
261 BOOL select_any_range
,
262 IDWriteFontSet1
**fontset
);
263 HRESULT GetFilteredFonts
(
264 DWRITE_FONT_PROPERTY
const *props
,
265 UINT32 num_properties
,
266 BOOL select_any_property
,
267 IDWriteFontSet1
**fontset
);
268 HRESULT GetFilteredFontIndices_
(
269 DWRITE_FONT_AXIS_RANGE
const *ranges
,
271 BOOL select_any_range
,
274 UINT32
*actual_num_indices
);
275 HRESULT GetFilteredFontIndices
(
276 DWRITE_FONT_PROPERTY
const *props
,
277 UINT32 num_properties
,
278 BOOL select_any_range
,
281 UINT32
*actual_num_indices
);
282 HRESULT GetFontAxisRanges_
(
284 DWRITE_FONT_AXIS_RANGE
*axis_ranges
,
286 UINT32
*actual_num_ranges
);
287 HRESULT GetFontAxisRanges
(
288 DWRITE_FONT_AXIS_RANGE
*axis_ranges
,
290 UINT32
*actual_num_ranges
);
291 HRESULT GetFontFaceReference
(
293 IDWriteFontFaceReference1
**reference
);
294 HRESULT CreateFontResource
(
296 IDWriteFontResource
**resource
);
297 HRESULT CreateFontFace
(
299 IDWriteFontFace5
**fontface
);
300 DWRITE_LOCALITY GetFontLocality
(UINT32 index
);
306 uuid(29748ed6
-8c9c
-4a6a
-be0b
-d912e8538944
)
308 interface IDWriteFont3
: IDWriteFont2
310 HRESULT CreateFontFace
(IDWriteFontFace3
**fontface
);
311 BOOL Equals
(IDWriteFont
*font
);
312 HRESULT GetFontFaceReference
(IDWriteFontFaceReference
**reference
);
313 BOOL HasCharacter
(UINT32 character
);
314 DWRITE_LOCALITY GetLocality
();
320 uuid(da20d8ef
-812a
-4c43
-9802-62ec4abd7adf
)
322 interface IDWriteFontFamily1
: IDWriteFontFamily
324 DWRITE_LOCALITY GetFontLocality
(UINT32 index
);
325 HRESULT GetFont
(UINT32 index
, IDWriteFont3
**font
);
326 HRESULT GetFontFaceReference
(UINT32 index
, IDWriteFontFaceReference
**reference
);
332 uuid(3ed49e77
-a398
-4261-b9cf
-c126c2131ef3
)
334 interface IDWriteFontFamily2
: IDWriteFontFamily1
336 HRESULT GetMatchingFonts
(
337 DWRITE_FONT_AXIS_VALUE
const *axis_values
,
339 IDWriteFontList2
**fontlist
);
340 HRESULT GetFontSet
(IDWriteFontSet1
**fontset
);
346 uuid(53585141-d9f8
-4095-8321-d73cf6bd116c
)
348 interface IDWriteFontCollection1
: IDWriteFontCollection
350 HRESULT GetFontSet
(IDWriteFontSet
**fontset
);
351 HRESULT GetFontFamily
(UINT32 index
, IDWriteFontFamily1
**family
);
357 uuid(514039c6
-4617-4064-bf8b
-92ea83e506e0
)
359 interface IDWriteFontCollection2
: IDWriteFontCollection1
361 HRESULT GetFontFamily
(
363 IDWriteFontFamily2
**family
);
364 HRESULT GetMatchingFonts
(
365 const WCHAR
*familyname
,
366 DWRITE_FONT_AXIS_VALUE
const *axis_values
,
368 IDWriteFontList2
**fontlist
);
369 DWRITE_FONT_FAMILY_MODEL GetFontFamilyModel
();
370 HRESULT GetFontSet
(IDWriteFontSet1
**fontset
);
376 uuid(a4d055a6
-f9e3
-4e25
-93b7
-9e309f3af8e9
)
378 interface IDWriteFontCollection3
: IDWriteFontCollection2
380 HANDLE GetExpirationEvent
();
386 uuid(5e7fa7ca
-dde3
-424c
-89f0
-9fcd6fed58cd
)
388 interface IDWriteFontFaceReference
: IUnknown
390 HRESULT CreateFontFace
(IDWriteFontFace3
**fontface
);
391 HRESULT CreateFontFaceWithSimulations
(DWRITE_FONT_SIMULATIONS simulations
,
392 IDWriteFontFace3
**fontface
);
393 BOOL Equals
(IDWriteFontFaceReference
*reference
);
394 UINT32 GetFontFaceIndex
();
395 DWRITE_FONT_SIMULATIONS GetSimulations
();
396 HRESULT GetFontFile
(IDWriteFontFile
**fontfile
);
397 UINT64 GetLocalFileSize
();
398 UINT64 GetFileSize
();
399 HRESULT GetFileTime
(FILETIME
*writetime
);
400 DWRITE_LOCALITY GetLocality
();
401 HRESULT EnqueueFontDownloadRequest
();
402 HRESULT EnqueueCharacterDownloadRequest
(WCHAR
const *chars
, UINT32 count
);
403 HRESULT EnqueueGlyphDownloadRequest
(UINT16
const *glyphs
, UINT32 count
);
404 HRESULT EnqueueFileFragmentDownloadRequest
(UINT64 offset
, UINT64 size
);
410 uuid(c081fe77
-2fd1
-41ac
-a5a3
-34983c4ba61a
)
412 interface IDWriteFontFaceReference1
: IDWriteFontFaceReference
414 HRESULT CreateFontFace
(IDWriteFontFace5
**fontface
);
415 UINT32 GetFontAxisValueCount
();
416 HRESULT GetFontAxisValues
(
417 DWRITE_FONT_AXIS_VALUE
*values
,
424 uuid(da20d8ef
-812a
-4c43
-9802-62ec4abd7ade
)
426 interface IDWriteFontList1
: IDWriteFontList
428 DWRITE_LOCALITY GetFontLocality
(UINT32 index
);
429 HRESULT GetFont
(UINT32 index
, IDWriteFont3
**font
);
430 HRESULT GetFontFaceReference
(UINT32 index
, IDWriteFontFaceReference
**reference
);
436 uuid(c0763a34
-77af
-445a
-b735
-08c37b0a5bf5
)
438 interface IDWriteFontList2
: IDWriteFontList1
440 HRESULT GetFontSet
(IDWriteFontSet1
**fontset
);
446 uuid(dc7ead19
-e54c
-43af
-b2da
-4e2b79ba3f7f
)
448 interface IDWriteFontSet2
: IDWriteFontSet1
450 HANDLE GetExpirationEvent
();
456 uuid(7c073ef2
-a7f4
-4045-8c32
-8ab8ae640f90
)
458 interface IDWriteFontSet3
: IDWriteFontSet2
460 DWRITE_FONT_SOURCE_TYPE GetFontSourceType
(UINT32 index
);
461 UINT32 GetFontSourceNameLength
(UINT32 index
);
462 HRESULT GetFontSourceName
(UINT32 index
, WCHAR
*buffer
, UINT32 buffer_size
);
468 uuid(d37d7598
-09be
-4222-a236
-2081341cc1f2
)
470 interface IDWriteFontFace3
: IDWriteFontFace2
472 HRESULT GetFontFaceReference
(IDWriteFontFaceReference
**reference
);
473 void GetPanose
(DWRITE_PANOSE
*panose
);
474 DWRITE_FONT_WEIGHT GetWeight
();
475 DWRITE_FONT_STRETCH GetStretch
();
476 DWRITE_FONT_STYLE GetStyle
();
477 HRESULT GetFamilyNames
(IDWriteLocalizedStrings
**names
);
478 HRESULT GetFaceNames
(IDWriteLocalizedStrings
**names
);
479 HRESULT GetInformationalStrings
(DWRITE_INFORMATIONAL_STRING_ID stringid
,
480 IDWriteLocalizedStrings
**strings
,
482 BOOL HasCharacter
(UINT32 character
);
483 HRESULT GetRecommendedRenderingMode
(
487 DWRITE_MATRIX
const *transform
,
489 DWRITE_OUTLINE_THRESHOLD threshold
,
490 DWRITE_MEASURING_MODE measuring_mode
,
491 IDWriteRenderingParams
*params
,
492 DWRITE_RENDERING_MODE1
*rendering_mode
,
493 DWRITE_GRID_FIT_MODE
*gridfit_mode
);
494 BOOL IsCharacterLocal
(UINT32 character
);
495 BOOL IsGlyphLocal
(UINT16 glyph
);
496 HRESULT AreCharactersLocal
(WCHAR
const *characters
,
497 UINT32 count
, BOOL enqueue_if_not
, BOOL
*are_local
);
498 HRESULT AreGlyphsLocal
(UINT16
const *glyphs
, UINT32 count
,
499 BOOL enqueue_if_not
, BOOL
*are_local
);
503 typedef struct DWRITE_LINE_METRICS1
506 UINT32 trailingWhitespaceLength
;
507 UINT32 newlineLength
;
513 } DWRITE_LINE_METRICS1
;
515 typedef enum DWRITE_FONT_LINE_GAP_USAGE
517 DWRITE_FONT_LINE_GAP_USAGE_DEFAULT
,
518 DWRITE_FONT_LINE_GAP_USAGE_DISABLED
,
519 DWRITE_FONT_LINE_GAP_USAGE_ENABLED
520 } DWRITE_FONT_LINE_GAP_USAGE
;
522 typedef struct DWRITE_LINE_SPACING
524 DWRITE_LINE_SPACING_METHOD method
;
528 DWRITE_FONT_LINE_GAP_USAGE fontLineGapUsage
;
529 } DWRITE_LINE_SPACING
;
534 uuid(f67e0edd
-9e3d
-4ecc
-8c32
-4183253dfe70
)
536 interface IDWriteTextFormat2
: IDWriteTextFormat1
538 HRESULT SetLineSpacing
(DWRITE_LINE_SPACING
const *spacing
);
539 HRESULT GetLineSpacing
(DWRITE_LINE_SPACING
*spacing
);
545 uuid(6d3b5641
-e550
-430d
-a85b
-b7bf48a93427
)
547 interface IDWriteTextFormat3
: IDWriteTextFormat2
549 HRESULT SetFontAxisValues
(
550 DWRITE_FONT_AXIS_VALUE
const *axis_values
,
552 UINT32 GetFontAxisValueCount
();
553 HRESULT GetFontAxisValues
(
554 DWRITE_FONT_AXIS_VALUE
const *axis_values
,
556 DWRITE_AUTOMATIC_FONT_AXES GetAutomaticFontAxes
();
557 HRESULT SetAutomaticFontAxes
(DWRITE_AUTOMATIC_FONT_AXES axes
);
563 uuid(07ddcd52
-020e-4de8
-ac33
-6c953d83f92d
)
565 interface IDWriteTextLayout3
: IDWriteTextLayout2
567 HRESULT InvalidateLayout
();
568 HRESULT SetLineSpacing
(DWRITE_LINE_SPACING
const *spacing
);
569 HRESULT GetLineSpacing
(DWRITE_LINE_SPACING
*spacing
);
570 HRESULT GetLineMetrics
(DWRITE_LINE_METRICS1
*metrics
, UINT32 max_count
, UINT32
*count
);
576 uuid(05a9bf42
-223f
-4441-b5fb
-8263685f55e9
)
578 interface IDWriteTextLayout4
: IDWriteTextLayout3
580 HRESULT SetFontAxisValues
(
581 DWRITE_FONT_AXIS_VALUE
const *axis_values
,
583 DWRITE_TEXT_RANGE
range);
584 UINT32 GetFontAxisValueCount
(UINT32 pos
);
585 HRESULT GetFontAxisValues
(
587 DWRITE_FONT_AXIS_VALUE
*values
,
589 DWRITE_TEXT_RANGE
*range);
590 DWRITE_AUTOMATIC_FONT_AXES GetAutomaticFontAxes
();
591 HRESULT SetAutomaticFontAxes
(DWRITE_AUTOMATIC_FONT_AXES axes
);
597 uuid(2397599d
-dd0d
-4681-bd6a
-f4f31eaade77
)
599 interface IDWriteFontFallback1
: IDWriteFontFallback
601 HRESULT MapCharacters
(
602 IDWriteTextAnalysisSource
*source,
605 IDWriteFontCollection
*base_collection
,
606 const WCHAR
*familyname
,
607 DWRITE_FONT_AXIS_VALUE
const *axis_values
,
609 UINT32
*mapped_length
,
611 IDWriteFontFace5
**fontface
);
617 uuid(4556be70
-3abd
-4f70
-90be
-421780a6f515
)
619 interface IDWriteGdiInterop1
: IDWriteGdiInterop
621 HRESULT CreateFontFromLOGFONT
(LOGFONTW
const *logfont
,
622 IDWriteFontCollection
*collection
,
625 /* GetFontSignature() methods are listed in reversed order to make
626 resulting vtable order compatible. */
627 HRESULT GetFontSignature_
(IDWriteFontFace
*fontface
, FONTSIGNATURE
*fontsig
);
628 HRESULT GetFontSignature
(IDWriteFont
*font
, FONTSIGNATURE
*fontsig
);
629 HRESULT GetMatchingFontsByLOGFONT
(LOGFONTW
const *logfont
,
630 IDWriteFontSet
*fontset
,
631 IDWriteFontSet
**subset
);
637 uuid(2f642afe
-9c68
-4f40
-b8be
-457401afcb3d
)
639 interface IDWriteFontSetBuilder
: IUnknown
641 HRESULT AddFontFaceReference_
(IDWriteFontFaceReference
*ref,
642 DWRITE_FONT_PROPERTY
const *props
,
644 HRESULT AddFontFaceReference
(IDWriteFontFaceReference
*ref);
645 HRESULT AddFontSet
(IDWriteFontSet
*fontset
);
646 HRESULT CreateFontSet
(IDWriteFontSet
**fontset
);
652 uuid(3ff7715f
-3cdc
-4dc6
-9b72
-ec5621dccafd
)
654 interface IDWriteFontSetBuilder1
: IDWriteFontSetBuilder
656 HRESULT AddFontFile
(IDWriteFontFile
*file
);
662 uuid(ee5ba612
-b131
-463c
-8f4f
-3189b9401e45
)
664 interface IDWriteFontSetBuilder2
: IDWriteFontSetBuilder1
667 IDWriteFontFile
*fontfile
,
669 DWRITE_FONT_SIMULATIONS simulations
,
670 DWRITE_FONT_AXIS_VALUE
const *axis_values
,
672 DWRITE_FONT_AXIS_RANGE
const *axis_ranges
,
674 DWRITE_FONT_PROPERTY
const *props
,
675 UINT32 num_properties
);
676 HRESULT AddFontFile
(const WCHAR
*filepath
);
682 uuid(9a1b41c3
-d3bb
-466a
-87fc
-fe67556a3b65
)
684 interface IDWriteFactory3
: IDWriteFactory2
686 HRESULT CreateGlyphRunAnalysis
(
687 DWRITE_GLYPH_RUN
const *run
,
688 DWRITE_MATRIX
const *transform
,
689 DWRITE_RENDERING_MODE1 rendering_mode
,
690 DWRITE_MEASURING_MODE measuring_mode
,
691 DWRITE_GRID_FIT_MODE gridfit_mode
,
692 DWRITE_TEXT_ANTIALIAS_MODE antialias_mode
,
695 IDWriteGlyphRunAnalysis
**analysis
);
697 HRESULT CreateCustomRenderingParams
(
699 FLOAT enhanced_contrast
,
700 FLOAT grayscale_enhanced_contrast
,
701 FLOAT cleartype_level
,
702 DWRITE_PIXEL_GEOMETRY pixel_geometry
,
703 DWRITE_RENDERING_MODE1 rendering_mode
,
704 DWRITE_GRID_FIT_MODE gridfit_mode
,
705 IDWriteRenderingParams3
**params
);
707 /* CreateFontFaceReference methods are listed in reversed order to make
708 resulting vtable order compatible. */
709 HRESULT CreateFontFaceReference_
(
710 IDWriteFontFile
*file
,
712 DWRITE_FONT_SIMULATIONS simulations
,
713 IDWriteFontFaceReference
**reference
);
715 HRESULT CreateFontFaceReference
(
717 FILETIME
const *writetime
,
719 DWRITE_FONT_SIMULATIONS simulations
,
720 IDWriteFontFaceReference
**reference
);
722 HRESULT GetSystemFontSet
(IDWriteFontSet
**fontset
);
723 HRESULT CreateFontSetBuilder
(IDWriteFontSetBuilder
**builder
);
724 HRESULT CreateFontCollectionFromFontSet
(
725 IDWriteFontSet
*fontset
,
726 IDWriteFontCollection1
**collection
);
728 HRESULT GetSystemFontCollection
(
729 BOOL include_downloadable
,
730 IDWriteFontCollection1
**collection
,
731 BOOL check_for_updates
);
733 HRESULT GetFontDownloadQueue
(IDWriteFontDownloadQueue
**queue
);
736 typedef struct DWRITE_GLYPH_IMAGE_DATA
738 void const *imageData
;
739 UINT32 imageDataSize
;
742 D2D1_SIZE_U pixelSize
;
743 D2D1_POINT_2L horizontalLeftOrigin
;
744 D2D1_POINT_2L horizontalRightOrigin
;
745 D2D1_POINT_2L verticalTopOrigin
;
746 D2D1_POINT_2L verticalBottomOrigin
;
747 } DWRITE_GLYPH_IMAGE_DATA
;
752 uuid(27f2a904
-4eb8
-441d
-9678-0563f53e3e2f
)
754 interface IDWriteFontFace4
: IDWriteFontFace3
756 HRESULT GetGlyphImageFormats_
(
760 DWRITE_GLYPH_IMAGE_FORMATS
*formats
);
761 DWRITE_GLYPH_IMAGE_FORMATS GetGlyphImageFormats
();
762 HRESULT GetGlyphImageData
(
765 DWRITE_GLYPH_IMAGE_FORMATS format
,
766 DWRITE_GLYPH_IMAGE_DATA
*data
,
768 void ReleaseGlyphImageData
(void *context
);
774 uuid(98eff3a5
-b667
-479a
-b145
-e2fa5b9fdc29
)
776 interface IDWriteFontFace5
: IDWriteFontFace4
778 UINT32 GetFontAxisValueCount
();
779 HRESULT GetFontAxisValues
(
780 DWRITE_FONT_AXIS_VALUE
*values
,
782 BOOL HasVariations
();
783 HRESULT GetFontResource
(IDWriteFontResource
**resource
);
784 BOOL Equals
(IDWriteFontFace
*fontface
);
787 typedef struct DWRITE_COLOR_GLYPH_RUN1
789 DWRITE_GLYPH_RUN glyphRun
;
790 DWRITE_GLYPH_RUN_DESCRIPTION
*glyphRunDescription
;
791 FLOAT baselineOriginX
;
792 FLOAT baselineOriginY
;
793 DWRITE_COLOR_F runColor
;
795 DWRITE_GLYPH_IMAGE_FORMATS glyphImageFormat
;
796 DWRITE_MEASURING_MODE measuringMode
;
797 } DWRITE_COLOR_GLYPH_RUN1
;
802 uuid(7c5f86da
-c7a1
-4f05
-b8e1
-55a179fe5a35
)
804 interface IDWriteColorGlyphRunEnumerator1
: IDWriteColorGlyphRunEnumerator
806 HRESULT GetCurrentRun
(
807 DWRITE_COLOR_GLYPH_RUN1
const **run
);
813 uuid(4b0b5bd3
-0797-4549-8ac5
-fe915cc53856
)
815 interface IDWriteFactory4
: IDWriteFactory3
817 HRESULT TranslateColorGlyphRun
(
818 D2D1_POINT_2F baseline_origin
,
819 DWRITE_GLYPH_RUN
const *run
,
820 DWRITE_GLYPH_RUN_DESCRIPTION
const *run_desc
,
821 DWRITE_GLYPH_IMAGE_FORMATS desired_formats
,
822 DWRITE_MEASURING_MODE measuring_mode
,
823 DWRITE_MATRIX
const *transform
,
825 IDWriteColorGlyphRunEnumerator1
**layers
);
827 HRESULT ComputeGlyphOrigins_
(
828 DWRITE_GLYPH_RUN
const *run
,
829 D2D1_POINT_2F baseline_origin
,
830 D2D1_POINT_2F
*origins
);
832 HRESULT ComputeGlyphOrigins
(
833 DWRITE_GLYPH_RUN
const *run
,
834 DWRITE_MEASURING_MODE measuring_mode
,
835 D2D1_POINT_2F baseline_origin
,
836 DWRITE_MATRIX
const *transform
,
837 D2D1_POINT_2F
*origins
);
843 uuid(ce25f8fd
-863b
-4d13
-9651-c1f88dc73fe2
)
845 interface IDWriteAsyncResult
: IUnknown
847 HANDLE GetWaitHandle
();
851 typedef struct DWRITE_FILE_FRAGMENT
855 } DWRITE_FILE_FRAGMENT
;
860 uuid(4db3757a
-2c72
-4ed9
-b2b6
-1ababe1aff9c
)
862 interface IDWriteRemoteFontFileStream
: IDWriteFontFileStream
864 HRESULT GetLocalFileSize
(UINT64
*size
);
865 HRESULT GetFileFragmentLocality
(UINT64 offset
, UINT64 size
, BOOL
*is_local
, UINT64
*partial_size
);
866 DWRITE_LOCALITY GetLocality
();
867 HRESULT BeginDownload
(
868 GUID
const *operation_id
,
869 DWRITE_FILE_FRAGMENT
const *fragments
,
870 UINT32 fragment_count
,
871 IDWriteAsyncResult
**async_result
);
874 typedef enum DWRITE_CONTAINER_TYPE
876 DWRITE_CONTAINER_TYPE_UNKNOWN
,
877 DWRITE_CONTAINER_TYPE_WOFF
,
878 DWRITE_CONTAINER_TYPE_WOFF2
,
879 } DWRITE_CONTAINER_TYPE
;
884 uuid(68648c83
-6ede
-46c0
-ab46
-20083a887fde
)
886 interface IDWriteRemoteFontFileLoader
: IDWriteFontFileLoader
888 HRESULT CreateRemoteStreamFromKey
(void const *key
, UINT32 key_size
, IDWriteRemoteFontFileStream
**stream
);
889 HRESULT GetLocalityFromKey
(void const *key
, UINT32 key_size
, DWRITE_LOCALITY
*locality
);
890 HRESULT CreateFontFileReferenceFromUrl
(
891 IDWriteFactory
*factory
,
892 WCHAR
const *base_url
,
893 WCHAR
const *file_url
,
894 IDWriteFontFile
**fontfile
);
900 uuid(dc102f47
-a12d
-4b1c
-822d
-9e117e33043f
)
902 interface IDWriteInMemoryFontFileLoader
: IDWriteFontFileLoader
904 HRESULT CreateInMemoryFontFileReference
(
905 IDWriteFactory
*factory
,
909 IDWriteFontFile
**fontfile
);
910 UINT32 GetFileCount
();
916 uuid(958db99a
-be2a
-4f09
-af7d
-65189803d1d3
)
918 interface IDWriteFactory5
: IDWriteFactory4
920 HRESULT CreateFontSetBuilder
(IDWriteFontSetBuilder1
**fontset_builder
);
921 HRESULT CreateInMemoryFontFileLoader
(IDWriteFontFileLoader
**loader
);
922 HRESULT CreateHttpFontFileLoader
(
923 WCHAR
const *referrer_url
,
924 WCHAR
const *extra_headers
,
925 IDWriteRemoteFontFileLoader
**loader
);
926 DWRITE_CONTAINER_TYPE AnalyzeContainerType
(void const *data
, UINT32 data_size
);
927 HRESULT UnpackFontFile
(
928 DWRITE_CONTAINER_TYPE container_type
,
931 IDWriteFontFileStream
**stream
);
937 uuid(f3744d80
-21f7
-42eb
-b35d
-995bc72fc223
)
939 interface IDWriteFactory6
: IDWriteFactory5
941 HRESULT CreateFontFaceReference
(
942 IDWriteFontFile
*file
,
944 DWRITE_FONT_SIMULATIONS simulations
,
945 DWRITE_FONT_AXIS_VALUE
const *axis_values
,
947 IDWriteFontFaceReference1
**face_ref
);
948 HRESULT CreateFontResource
(
949 IDWriteFontFile
*file
,
951 IDWriteFontResource
**resource
);
952 HRESULT GetSystemFontSet
(
953 BOOL include_downloadable
,
954 IDWriteFontSet1
**fontset
);
955 HRESULT GetSystemFontCollection
(
956 BOOL include_downloadable
,
957 DWRITE_FONT_FAMILY_MODEL family_model
,
958 IDWriteFontCollection2
**collection
);
959 HRESULT CreateFontCollectionFromFontSet
(
960 IDWriteFontSet
*fontset
,
961 DWRITE_FONT_FAMILY_MODEL family_model
,
962 IDWriteFontCollection2
**collection
);
963 HRESULT CreateFontSetBuilder
(
964 IDWriteFontSetBuilder2
**builder
);
965 HRESULT CreateTextFormat
(
966 const WCHAR
*familyname
,
967 IDWriteFontCollection
*collection
,
968 DWRITE_FONT_AXIS_VALUE
const *axis_values
,
971 const WCHAR
*localename
,
972 IDWriteTextFormat3
**format
);
978 uuid(35d0e0b3
-9076-4d2e
-a016
-a91b568a06b4
)
980 interface IDWriteFactory7
: IDWriteFactory6
982 HRESULT GetSystemFontSet
(
983 BOOL include_downloadable
,
984 IDWriteFontSet2
**fontset
);
985 HRESULT GetSystemFontCollection
(
986 BOOL include_downloadable
,
987 DWRITE_FONT_FAMILY_MODEL family_model
,
988 IDWriteFontCollection3
**collection
);