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 struct DWRITE_FONT_AXIS_VALUE
89 DWRITE_FONT_AXIS_TAG axisTag
;
91 } DWRITE_FONT_AXIS_VALUE
;
93 typedef struct DWRITE_FONT_AXIS_RANGE
95 DWRITE_FONT_AXIS_TAG axisTag
;
98 } DWRITE_FONT_AXIS_RANGE
;
100 typedef enum DWRITE_AUTOMATIC_FONT_AXES
102 DWRITE_AUTOMATIC_FONT_AXES_NONE
,
103 DWRITE_AUTOMATIC_FONT_AXES_OPTICAL_SIZE
,
104 } DWRITE_AUTOMATIC_FONT_AXES
;
106 typedef enum DWRITE_FONT_AXIS_ATTRIBUTES
108 DWRITE_FONT_AXIS_ATTRIBUTES_NONE
,
109 DWRITE_FONT_AXIS_ATTRIBUTES_VARIABLE
,
110 DWRITE_FONT_AXIS_ATTRIBUTES_HIDDEN
,
111 } DWRITE_FONT_AXIS_ATTRIBUTES
;
113 typedef enum DWRITE_FONT_FAMILY_MODEL
115 DWRITE_FONT_FAMILY_MODEL_TYPOGRAPHIC
,
116 DWRITE_FONT_FAMILY_MODEL_WEIGHT_STRETCH_STYLE
,
117 } DWRITE_FONT_FAMILY_MODEL
;
122 uuid(b06fe5b9
-43ec
-4393-881b
-dbe4dc72fda7
)
124 interface IDWriteFontDownloadListener
: IUnknown
126 void DownloadCompleted
(IDWriteFontDownloadQueue
*queue
, IUnknown
*context
, HRESULT result
);
132 uuid(b71e6052
-5aea
-4fa3
-832e
-f60d431f7e91
)
134 interface IDWriteFontDownloadQueue
: IUnknown
136 HRESULT AddListener
(IDWriteFontDownloadListener
*listener
, UINT32
*token
);
137 HRESULT RemoveListener
(UINT32 token
);
139 HRESULT BeginDownload
(IUnknown
*context
);
140 HRESULT CancelDownload
();
141 UINT64 GetGenerationCount
();
147 uuid(b7924baa
-391b
-412a
-8c5c
-e44cc2d867dc
)
149 interface IDWriteRenderingParams3
: IDWriteRenderingParams2
151 DWRITE_RENDERING_MODE1 GetRenderingMode1
();
157 uuid(cfee3140
-1257-47ca
-8b85
-31bfcf3f2d0e
)
159 interface IDWriteStringList
: IUnknown
162 HRESULT GetLocaleNameLength
(UINT32 index
, UINT32
*length
);
163 HRESULT GetLocaleName
(UINT32 index
, WCHAR
*name
, UINT32 size
);
164 HRESULT GetStringLength
(UINT32 index
, UINT32
*length
);
165 HRESULT GetString
(UINT32 index
, WCHAR
*string, UINT32 size
);
171 uuid(53585141-d9f8
-4095-8321-d73cf6bd116b
)
173 interface IDWriteFontSet
: IUnknown
175 UINT32 GetFontCount
();
176 HRESULT GetFontFaceReference
(UINT32 index
, IDWriteFontFaceReference
**reference
);
177 HRESULT FindFontFaceReference
(IDWriteFontFaceReference
*reference
,
178 UINT32
*index
, BOOL
*exists
);
179 HRESULT FindFontFace
(IDWriteFontFace
*fontface
, UINT32
*index
, BOOL
*exists
);
180 HRESULT GetPropertyValues__
(DWRITE_FONT_PROPERTY_ID
id, IDWriteStringList
**values
);
181 HRESULT GetPropertyValues_
(DWRITE_FONT_PROPERTY_ID
id,
182 WCHAR
const *preferred_locales
, IDWriteStringList
**values
);
183 HRESULT GetPropertyValues
(UINT32 index
, DWRITE_FONT_PROPERTY_ID
id, BOOL
*exists
,
184 IDWriteLocalizedStrings
**values
);
185 HRESULT GetPropertyOccurrenceCount
(DWRITE_FONT_PROPERTY
const *property
, UINT32
*count
);
186 HRESULT GetMatchingFonts_
(WCHAR
const *family
, DWRITE_FONT_WEIGHT weight
, DWRITE_FONT_STRETCH stretch
,
187 DWRITE_FONT_STYLE style
, IDWriteFontSet
**fontset
);
188 HRESULT GetMatchingFonts
(DWRITE_FONT_PROPERTY
const *props
, UINT32 count
, IDWriteFontSet
**fontset
);
194 uuid(1f803a76
-6871-48e8
-987f
-b975551c50f2
)
196 interface IDWriteFontResource
: IUnknown
198 HRESULT GetFontFile
(IDWriteFontFile
**fontfile
);
199 UINT32 GetFontFaceIndex
();
200 UINT32 GetFontAxisCount
();
201 HRESULT GetDefaultFontAxisValues
(
202 DWRITE_FONT_AXIS_VALUE
const *values
,
204 HRESULT GetFontAxisRanges
(
205 DWRITE_FONT_AXIS_RANGE
const *ranges
,
207 DWRITE_FONT_AXIS_ATTRIBUTES GetFontAxisAttributes
(
209 HRESULT GetAxisNames
(
211 IDWriteLocalizedStrings
**names
);
212 UINT32 GetAxisValueNameCount
(
214 HRESULT GetAxisValueNames
(
217 DWRITE_FONT_AXIS_RANGE
*axis_range
,
218 IDWriteLocalizedStrings
**names
);
219 BOOL HasVariations
();
220 HRESULT CreateFontFace
(
221 DWRITE_FONT_SIMULATIONS simulations
,
222 DWRITE_FONT_AXIS_VALUE
const *axis_values
,
224 IDWriteFontFace5
**fontface
);
225 HRESULT CreateFontFaceReference
(
226 DWRITE_FONT_SIMULATIONS simulations
,
227 DWRITE_FONT_AXIS_VALUE
const *axis_values
,
229 IDWriteFontFaceReference1
**reference
);
235 uuid(7e9fda85
-6c92
-4053-bc47
-7ae3530db4d3
)
237 interface IDWriteFontSet1
: IDWriteFontSet
239 HRESULT GetMatchingFonts
(
240 DWRITE_FONT_PROPERTY
const *property
,
241 DWRITE_FONT_AXIS_VALUE
const *axis_values
,
243 IDWriteFontSet1
**fontset
);
244 HRESULT GetFirstFontResources
(IDWriteFontSet1
**fontset
);
245 HRESULT GetFilteredFonts__
(
246 UINT32
const *indices
,
248 IDWriteFontSet1
**fontset
);
249 HRESULT GetFilteredFonts_
(
250 DWRITE_FONT_AXIS_RANGE
const *axis_ranges
,
252 BOOL select_any_range
,
253 IDWriteFontSet1
**fontset
);
254 HRESULT GetFilteredFonts
(
255 DWRITE_FONT_PROPERTY
const *props
,
256 UINT32 num_properties
,
257 BOOL select_any_property
,
258 IDWriteFontSet1
**fontset
);
259 HRESULT GetFilteredFontIndices_
(
260 DWRITE_FONT_AXIS_RANGE
const *ranges
,
262 BOOL select_any_range
,
265 UINT32
*actual_num_indices
);
266 HRESULT GetFilteredFontIndices
(
267 DWRITE_FONT_PROPERTY
const *props
,
268 UINT32 num_properties
,
269 BOOL select_any_range
,
272 UINT32
*actual_num_indices
);
273 HRESULT GetFontAxisRanges_
(
275 DWRITE_FONT_AXIS_RANGE
*axis_ranges
,
277 UINT32
*actual_num_ranges
);
278 HRESULT GetFontAxisRanges
(
279 DWRITE_FONT_AXIS_RANGE
*axis_ranges
,
281 UINT32
*actual_num_ranges
);
282 HRESULT GetFontFaceReference
(
284 IDWriteFontFaceReference1
**reference
);
285 HRESULT CreateFontResource
(
287 IDWriteFontResource
**resource
);
288 HRESULT CreateFontFace
(
290 IDWriteFontFace5
**fontface
);
291 DWRITE_LOCALITY GetFontLocality
(UINT32 index
);
297 uuid(29748ed6
-8c9c
-4a6a
-be0b
-d912e8538944
)
299 interface IDWriteFont3
: IDWriteFont2
301 HRESULT CreateFontFace
(IDWriteFontFace3
**fontface
);
302 BOOL Equals
(IDWriteFont
*font
);
303 HRESULT GetFontFaceReference
(IDWriteFontFaceReference
**reference
);
304 BOOL HasCharacter
(UINT32 character
);
305 DWRITE_LOCALITY GetLocality
();
311 uuid(da20d8ef
-812a
-4c43
-9802-62ec4abd7adf
)
313 interface IDWriteFontFamily1
: IDWriteFontFamily
315 DWRITE_LOCALITY GetFontLocality
(UINT32 index
);
316 HRESULT GetFont
(UINT32 index
, IDWriteFont3
**font
);
317 HRESULT GetFontFaceReference
(UINT32 index
, IDWriteFontFaceReference
**reference
);
323 uuid(3ed49e77
-a398
-4261-b9cf
-c126c2131ef3
)
325 interface IDWriteFontFamily2
: IDWriteFontFamily1
327 HRESULT GetMatchingFonts
(
328 DWRITE_FONT_AXIS_VALUE
const *axis_values
,
330 IDWriteFontList2
**fontlist
);
331 HRESULT GetFontSet
(IDWriteFontSet1
**fontset
);
337 uuid(53585141-d9f8
-4095-8321-d73cf6bd116c
)
339 interface IDWriteFontCollection1
: IDWriteFontCollection
341 HRESULT GetFontSet
(IDWriteFontSet
**fontset
);
342 HRESULT GetFontFamily
(UINT32 index
, IDWriteFontFamily1
**family
);
348 uuid(514039c6
-4617-4064-bf8b
-92ea83e506e0
)
350 interface IDWriteFontCollection2
: IDWriteFontCollection1
352 HRESULT GetFontFamily
(
354 IDWriteFontFamily2
**family
);
355 HRESULT GetMatchingFonts
(
356 const WCHAR
*familyname
,
357 DWRITE_FONT_AXIS_VALUE
const *axis_values
,
359 IDWriteFontList2
**fontlist
);
360 DWRITE_FONT_FAMILY_MODEL GetFontFamilyModel
();
361 HRESULT GetFontSet
(IDWriteFontSet1
**fontset
);
367 uuid(a4d055a6
-f9e3
-4e25
-93b7
-9e309f3af8e9
)
369 interface IDWriteFontCollection3
: IDWriteFontCollection2
371 HANDLE GetExiprationEvent
();
377 uuid(5e7fa7ca
-dde3
-424c
-89f0
-9fcd6fed58cd
)
379 interface IDWriteFontFaceReference
: IUnknown
381 HRESULT CreateFontFace
(IDWriteFontFace3
**fontface
);
382 HRESULT CreateFontFaceWithSimulations
(DWRITE_FONT_SIMULATIONS simulations
,
383 IDWriteFontFace3
**fontface
);
384 BOOL Equals
(IDWriteFontFaceReference
*reference
);
385 UINT32 GetFontFaceIndex
();
386 DWRITE_FONT_SIMULATIONS GetSimulations
();
387 HRESULT GetFontFile
(IDWriteFontFile
**fontfile
);
388 UINT64 GetLocalFileSize
();
389 UINT64 GetFileSize
();
390 HRESULT GetFileTime
(FILETIME
*writetime
);
391 DWRITE_LOCALITY GetLocality
();
392 HRESULT EnqueueFontDownloadRequest
();
393 HRESULT EnqueueCharacterDownloadRequest
(WCHAR
const *chars
, UINT32 count
);
394 HRESULT EnqueueGlyphDownloadRequest
(UINT16
const *glyphs
, UINT32 count
);
395 HRESULT EnqueueFileFragmentDownloadRequest
(UINT64 offset
, UINT64 size
);
401 uuid(c081fe77
-2fd1
-41ac
-a5a3
-34983c4ba61a
)
403 interface IDWriteFontFaceReference1
: IDWriteFontFaceReference
405 HRESULT CreateFontFace
(IDWriteFontFace5
**fontface
);
406 UINT32 GetFontAxisValueCount
();
407 HRESULT GetFontAxisValues
(
408 DWRITE_FONT_AXIS_VALUE
*values
,
415 uuid(da20d8ef
-812a
-4c43
-9802-62ec4abd7ade
)
417 interface IDWriteFontList1
: IDWriteFontList
419 DWRITE_LOCALITY GetFontLocality
(UINT32 index
);
420 HRESULT GetFont
(UINT32 index
, IDWriteFont3
**font
);
421 HRESULT GetFontFaceReference
(UINT32 index
, IDWriteFontFaceReference
**reference
);
427 uuid(c0763a34
-77af
-445a
-b735
-08c37b0a5bf5
)
429 interface IDWriteFontList2
: IDWriteFontList1
431 HRESULT GetFontSet
(IDWriteFontSet1
**fontset
);
437 uuid(dc7ead19
-e54c
-43af
-b2da
-4e2b79ba3f7f
)
439 interface IDWriteFontSet2
: IDWriteFontSet1
441 HANDLE GetExpirationEvent
();
447 uuid(d37d7598
-09be
-4222-a236
-2081341cc1f2
)
449 interface IDWriteFontFace3
: IDWriteFontFace2
451 HRESULT GetFontFaceReference
(IDWriteFontFaceReference
**reference
);
452 void GetPanose
(DWRITE_PANOSE
*panose
);
453 DWRITE_FONT_WEIGHT GetWeight
();
454 DWRITE_FONT_STRETCH GetStretch
();
455 DWRITE_FONT_STYLE GetStyle
();
456 HRESULT GetFamilyNames
(IDWriteLocalizedStrings
**names
);
457 HRESULT GetFaceNames
(IDWriteLocalizedStrings
**names
);
458 HRESULT GetInformationalStrings
(DWRITE_INFORMATIONAL_STRING_ID stringid
,
459 IDWriteLocalizedStrings
**strings
,
461 BOOL HasCharacter
(UINT32 character
);
462 HRESULT GetRecommendedRenderingMode
(
466 DWRITE_MATRIX
const *transform
,
468 DWRITE_OUTLINE_THRESHOLD threshold
,
469 DWRITE_MEASURING_MODE measuring_mode
,
470 IDWriteRenderingParams
*params
,
471 DWRITE_RENDERING_MODE1
*rendering_mode
,
472 DWRITE_GRID_FIT_MODE
*gridfit_mode
);
473 BOOL IsCharacterLocal
(UINT32 character
);
474 BOOL IsGlyphLocal
(UINT16 glyph
);
475 HRESULT AreCharactersLocal
(WCHAR
const *characters
,
476 UINT32 count
, BOOL enqueue_if_not
, BOOL
*are_local
);
477 HRESULT AreGlyphsLocal
(UINT16
const *glyphs
, UINT32 count
,
478 BOOL enqueue_if_not
, BOOL
*are_local
);
482 typedef struct DWRITE_LINE_METRICS1
485 UINT32 trailingWhitespaceLength
;
486 UINT32 newlineLength
;
492 } DWRITE_LINE_METRICS1
;
494 typedef enum DWRITE_FONT_LINE_GAP_USAGE
496 DWRITE_FONT_LINE_GAP_USAGE_DEFAULT
,
497 DWRITE_FONT_LINE_GAP_USAGE_DISABLED
,
498 DWRITE_FONT_LINE_GAP_USAGE_ENABLED
499 } DWRITE_FONT_LINE_GAP_USAGE
;
501 typedef struct DWRITE_LINE_SPACING
503 DWRITE_LINE_SPACING_METHOD method
;
507 DWRITE_FONT_LINE_GAP_USAGE fontLineGapUsage
;
508 } DWRITE_LINE_SPACING
;
513 uuid(f67e0edd
-9e3d
-4ecc
-8c32
-4183253dfe70
)
515 interface IDWriteTextFormat2
: IDWriteTextFormat1
517 HRESULT SetLineSpacing
(DWRITE_LINE_SPACING
const *spacing
);
518 HRESULT GetLineSpacing
(DWRITE_LINE_SPACING
*spacing
);
524 uuid(6d3b5641
-e550
-430d
-a85b
-b7bf48a93427
)
526 interface IDWriteTextFormat3
: IDWriteTextFormat2
528 HRESULT SetFontAxisValues
(
529 DWRITE_FONT_AXIS_VALUE
const *axis_values
,
531 UINT32 GetFontAxisValueCount
();
532 HRESULT GetFontAxisValues
(
533 DWRITE_FONT_AXIS_VALUE
const *axis_values
,
535 DWRITE_AUTOMATIC_FONT_AXES GetAutomaticFontAxes
();
536 HRESULT SetAutomaticFontAxes
(DWRITE_AUTOMATIC_FONT_AXES axes
);
542 uuid(07ddcd52
-020e-4de8
-ac33
-6c953d83f92d
)
544 interface IDWriteTextLayout3
: IDWriteTextLayout2
546 HRESULT InvalidateLayout
();
547 HRESULT SetLineSpacing
(DWRITE_LINE_SPACING
const *spacing
);
548 HRESULT GetLineSpacing
(DWRITE_LINE_SPACING
*spacing
);
549 HRESULT GetLineMetrics
(DWRITE_LINE_METRICS1
*metrics
, UINT32 max_count
, UINT32
*count
);
555 uuid(05a9bf42
-223f
-4441-b5fb
-8263685f55e9
)
557 interface IDWriteTextLayout4
: IDWriteTextLayout3
559 HRESULT SetFontAxisValues
(
560 DWRITE_FONT_AXIS_VALUE
const *axis_values
,
562 DWRITE_TEXT_RANGE
range);
563 UINT32 GetFontAxisValueCount
(UINT32 pos
);
564 HRESULT GetFontAxisValues
(
566 DWRITE_FONT_AXIS_VALUE
*values
,
568 DWRITE_TEXT_RANGE
*range);
569 DWRITE_AUTOMATIC_FONT_AXES GetAutomaticFontAxes
();
570 HRESULT SetAutomaticFontAxes
(DWRITE_AUTOMATIC_FONT_AXES axes
);
576 uuid(2397599d
-dd0d
-4681-bd6a
-f4f31eaade77
)
578 interface IDWriteFontFallback1
: IDWriteFontFallback
580 HRESULT MapCharacters
(
581 IDWriteTextAnalysisSource
*source,
584 IDWriteFontCollection
*base_collection
,
585 const WCHAR
*familyname
,
586 DWRITE_FONT_AXIS_VALUE
const *axis_values
,
588 UINT32
*mapped_length
,
590 IDWriteFontFace5
**fontface
);
596 uuid(4556be70
-3abd
-4f70
-90be
-421780a6f515
)
598 interface IDWriteGdiInterop1
: IDWriteGdiInterop
600 HRESULT CreateFontFromLOGFONT
(LOGFONTW
const *logfont
,
601 IDWriteFontCollection
*collection
,
604 /* GetFontSignature() methods are listed in reversed order to make
605 resulting vtable order compatible. */
606 HRESULT GetFontSignature_
(IDWriteFontFace
*fontface
, FONTSIGNATURE
*fontsig
);
607 HRESULT GetFontSignature
(IDWriteFont
*font
, FONTSIGNATURE
*fontsig
);
608 HRESULT GetMatchingFontsByLOGFONT
(LOGFONTW
const *logfont
,
609 IDWriteFontSet
*fontset
,
610 IDWriteFontSet
**subset
);
616 uuid(2f642afe
-9c68
-4f40
-b8be
-457401afcb3d
)
618 interface IDWriteFontSetBuilder
: IUnknown
620 HRESULT AddFontFaceReference_
(IDWriteFontFaceReference
*ref,
621 DWRITE_FONT_PROPERTY
const *props
,
623 HRESULT AddFontFaceReference
(IDWriteFontFaceReference
*ref);
624 HRESULT AddFontSet
(IDWriteFontSet
*fontset
);
625 HRESULT CreateFontSet
(IDWriteFontSet
**fontset
);
631 uuid(3ff7715f
-3cdc
-4dc6
-9b72
-ec5621dccafd
)
633 interface IDWriteFontSetBuilder1
: IDWriteFontSetBuilder
635 HRESULT AddFontFile
(IDWriteFontFile
*file
);
641 uuid(ee5ba612
-b131
-463c
-8f4f
-3189b9401e45
)
643 interface IDWriteFontSetBuilder2
: IDWriteFontSetBuilder1
646 IDWriteFontFile
*fontfile
,
648 DWRITE_FONT_SIMULATIONS simulations
,
649 DWRITE_FONT_AXIS_VALUE
const *axis_values
,
651 DWRITE_FONT_AXIS_RANGE
const *axis_ranges
,
653 DWRITE_FONT_PROPERTY
const *props
,
654 UINT32 num_properties
);
655 HRESULT AddFontFile
(const WCHAR
*filepath
);
661 uuid(9a1b41c3
-d3bb
-466a
-87fc
-fe67556a3b65
)
663 interface IDWriteFactory3
: IDWriteFactory2
665 HRESULT CreateGlyphRunAnalysis
(
666 DWRITE_GLYPH_RUN
const *run
,
667 DWRITE_MATRIX
const *transform
,
668 DWRITE_RENDERING_MODE1 rendering_mode
,
669 DWRITE_MEASURING_MODE measuring_mode
,
670 DWRITE_GRID_FIT_MODE gridfit_mode
,
671 DWRITE_TEXT_ANTIALIAS_MODE antialias_mode
,
674 IDWriteGlyphRunAnalysis
**analysis
);
676 HRESULT CreateCustomRenderingParams
(
678 FLOAT enhanced_contrast
,
679 FLOAT grayscale_enhanced_contrast
,
680 FLOAT cleartype_level
,
681 DWRITE_PIXEL_GEOMETRY pixel_geometry
,
682 DWRITE_RENDERING_MODE1 rendering_mode
,
683 DWRITE_GRID_FIT_MODE gridfit_mode
,
684 IDWriteRenderingParams3
**params
);
686 /* CreateFontFaceReference methods are listed in reversed order to make
687 resulting vtable order compatible. */
688 HRESULT CreateFontFaceReference_
(
689 IDWriteFontFile
*file
,
691 DWRITE_FONT_SIMULATIONS simulations
,
692 IDWriteFontFaceReference
**reference
);
694 HRESULT CreateFontFaceReference
(
696 FILETIME
const *writetime
,
698 DWRITE_FONT_SIMULATIONS simulations
,
699 IDWriteFontFaceReference
**reference
);
701 HRESULT GetSystemFontSet
(IDWriteFontSet
**fontset
);
702 HRESULT CreateFontSetBuilder
(IDWriteFontSetBuilder
**builder
);
703 HRESULT CreateFontCollectionFromFontSet
(
704 IDWriteFontSet
*fontset
,
705 IDWriteFontCollection1
**collection
);
707 HRESULT GetSystemFontCollection
(
708 BOOL include_downloadable
,
709 IDWriteFontCollection1
**collection
,
710 BOOL check_for_updates
);
712 HRESULT GetFontDownloadQueue
(IDWriteFontDownloadQueue
**queue
);
715 typedef enum DWRITE_GLYPH_IMAGE_FORMATS
717 DWRITE_GLYPH_IMAGE_FORMATS_NONE
= 0,
718 DWRITE_GLYPH_IMAGE_FORMATS_TRUETYPE
= 1 << 0,
719 DWRITE_GLYPH_IMAGE_FORMATS_CFF
= 1 << 1,
720 DWRITE_GLYPH_IMAGE_FORMATS_COLR
= 1 << 2,
721 DWRITE_GLYPH_IMAGE_FORMATS_SVG
= 1 << 3,
722 DWRITE_GLYPH_IMAGE_FORMATS_PNG
= 1 << 4,
723 DWRITE_GLYPH_IMAGE_FORMATS_JPEG
= 1 << 5,
724 DWRITE_GLYPH_IMAGE_FORMATS_TIFF
= 1 << 6,
725 DWRITE_GLYPH_IMAGE_FORMATS_PREMULTIPLIED_B8G8R8A8
= 1 << 7
726 } DWRITE_GLYPH_IMAGE_FORMATS
;
728 typedef struct DWRITE_GLYPH_IMAGE_DATA
730 void const *imageData
;
731 UINT32 imageDataSize
;
734 D2D1_SIZE_U pixelSize
;
735 D2D1_POINT_2L horizontalLeftOrigin
;
736 D2D1_POINT_2L horizontalRightOrigin
;
737 D2D1_POINT_2L verticalTopOrigin
;
738 D2D1_POINT_2L verticalBottomOrigin
;
739 } DWRITE_GLYPH_IMAGE_DATA
;
744 uuid(27f2a904
-4eb8
-441d
-9678-0563f53e3e2f
)
746 interface IDWriteFontFace4
: IDWriteFontFace3
748 HRESULT GetGlyphImageFormats_
(
752 DWRITE_GLYPH_IMAGE_FORMATS
*formats
);
753 DWRITE_GLYPH_IMAGE_FORMATS GetGlyphImageFormats
();
754 HRESULT GetGlyphImageData
(
757 DWRITE_GLYPH_IMAGE_FORMATS format
,
758 DWRITE_GLYPH_IMAGE_DATA
*data
,
760 void ReleaseGlyphImageData
(void *context
);
766 uuid(98eff3a5
-b667
-479a
-b145
-e2fa5b9fdc29
)
768 interface IDWriteFontFace5
: IDWriteFontFace4
770 UINT32 GetFontAxisValueCount
();
771 HRESULT GetFontAxisValues
(
772 DWRITE_FONT_AXIS_VALUE
*values
,
774 BOOL HasVariations
();
775 HRESULT GetFontResource
(IDWriteFontResource
**resource
);
776 BOOL Equals
(IDWriteFontFace
*fontface
);
779 typedef struct DWRITE_COLOR_GLYPH_RUN1
781 DWRITE_GLYPH_RUN glyphRun
;
782 DWRITE_GLYPH_RUN_DESCRIPTION
*glyphRunDescription
;
783 FLOAT baselineOriginX
;
784 FLOAT baselineOriginY
;
785 DWRITE_COLOR_F runColor
;
787 DWRITE_GLYPH_IMAGE_FORMATS glyphImageFormat
;
788 DWRITE_MEASURING_MODE measuringMode
;
789 } DWRITE_COLOR_GLYPH_RUN1
;
794 uuid(7c5f86da
-c7a1
-4f05
-b8e1
-55a179fe5a35
)
796 interface IDWriteColorGlyphRunEnumerator1
: IDWriteColorGlyphRunEnumerator
798 HRESULT GetCurrentRun
(
799 DWRITE_COLOR_GLYPH_RUN1
const **run
);
805 uuid(4b0b5bd3
-0797-4549-8ac5
-fe915cc53856
)
807 interface IDWriteFactory4
: IDWriteFactory3
809 HRESULT TranslateColorGlyphRun
(
810 D2D1_POINT_2F baseline_origin
,
811 DWRITE_GLYPH_RUN
const *run
,
812 DWRITE_GLYPH_RUN_DESCRIPTION
const *run_desc
,
813 DWRITE_GLYPH_IMAGE_FORMATS desired_formats
,
814 DWRITE_MEASURING_MODE measuring_mode
,
815 DWRITE_MATRIX
const *transform
,
817 IDWriteColorGlyphRunEnumerator1
**layers
);
819 HRESULT ComputeGlyphOrigins_
(
820 DWRITE_GLYPH_RUN
const *run
,
821 D2D1_POINT_2F baseline_origin
,
822 D2D1_POINT_2F
*origins
);
824 HRESULT ComputeGlyphOrigins
(
825 DWRITE_GLYPH_RUN
const *run
,
826 DWRITE_MEASURING_MODE measuring_mode
,
827 D2D1_POINT_2F baseline_origin
,
828 DWRITE_MATRIX
const *transform
,
829 D2D1_POINT_2F
*origins
);
835 uuid(ce25f8fd
-863b
-4d13
-9651-c1f88dc73fe2
)
837 interface IDWriteAsyncResult
: IUnknown
839 HANDLE GetWaitHandle
();
843 typedef struct DWRITE_FILE_FRAGMENT
847 } DWRITE_FILE_FRAGMENT
;
852 uuid(4db3757a
-2c72
-4ed9
-b2b6
-1ababe1aff9c
)
854 interface IDWriteRemoteFontFileStream
: IDWriteFontFileStream
856 HRESULT GetLocalFileSize
(UINT64
*size
);
857 HRESULT GetFileFragmentLocality
(UINT64 offset
, UINT64 size
, BOOL
*is_local
, UINT64
*partial_size
);
858 DWRITE_LOCALITY GetLocality
();
859 HRESULT BeginDownload
(
860 GUID
const *operation_id
,
861 DWRITE_FILE_FRAGMENT
const *fragments
,
862 UINT32 fragment_count
,
863 IDWriteAsyncResult
**async_result
);
866 typedef enum DWRITE_CONTAINER_TYPE
868 DWRITE_CONTAINER_TYPE_UNKNOWN
,
869 DWRITE_CONTAINER_TYPE_WOFF
,
870 DWRITE_CONTAINER_TYPE_WOFF2
,
871 } DWRITE_CONTAINER_TYPE
;
876 uuid(68648c83
-6ede
-46c0
-ab46
-20083a887fde
)
878 interface IDWriteRemoteFontFileLoader
: IDWriteFontFileLoader
880 HRESULT CreateRemoteStreamFromKey
(void const *key
, UINT32 key_size
, IDWriteRemoteFontFileStream
**stream
);
881 HRESULT GetLocalityFromKey
(void const *key
, UINT32 key_size
, DWRITE_LOCALITY
*locality
);
882 HRESULT CreateFontFileReferenceFromUrl
(
883 IDWriteFactory
*factory
,
884 WCHAR
const *base_url
,
885 WCHAR
const *file_url
,
886 IDWriteFontFile
**fontfile
);
892 uuid(dc102f47
-a12d
-4b1c
-822d
-9e117e33043f
)
894 interface IDWriteInMemoryFontFileLoader
: IDWriteFontFileLoader
896 HRESULT CreateInMemoryFontFileReference
(
897 IDWriteFactory
*factory
,
901 IDWriteFontFile
**fontfile
);
902 UINT32 GetFileCount
();
908 uuid(958db99a
-be2a
-4f09
-af7d
-65189803d1d3
)
910 interface IDWriteFactory5
: IDWriteFactory4
912 HRESULT CreateFontSetBuilder
(IDWriteFontSetBuilder1
**fontset_builder
);
913 HRESULT CreateInMemoryFontFileLoader
(IDWriteFontFileLoader
**loader
);
914 HRESULT CreateHttpFontFileLoader
(
915 WCHAR
const *referrer_url
,
916 WCHAR
const *extra_headers
,
917 IDWriteRemoteFontFileLoader
**loader
);
918 DWRITE_CONTAINER_TYPE AnalyzeContainerType
(void const *data
, UINT32 data_size
);
919 HRESULT UnpackFontFile
(
920 DWRITE_CONTAINER_TYPE container_type
,
923 IDWriteFontFileStream
**stream
);
929 uuid(f3744d80
-21f7
-42eb
-b35d
-995bc72fc223
)
931 interface IDWriteFactory6
: IDWriteFactory5
933 HRESULT CreateFontFaceReference
(
934 IDWriteFontFile
*file
,
936 DWRITE_FONT_SIMULATIONS simulations
,
937 DWRITE_FONT_AXIS_VALUE
const *axis_values
,
939 IDWriteFontFaceReference1
**face_ref
);
940 HRESULT CreateFontResource
(
941 IDWriteFontFile
*file
,
943 IDWriteFontResource
**resource
);
944 HRESULT GetSystemFontSet
(
945 BOOL include_downloadable
,
946 IDWriteFontSet1
**fontset
);
947 HRESULT GetSystemFontCollection
(
948 BOOL include_downloadable
,
949 DWRITE_FONT_FAMILY_MODEL family_model
,
950 IDWriteFontCollection2
**collection
);
951 HRESULT CreateFontCollectionFromFontSet
(
952 IDWriteFontSet
*fontset
,
953 DWRITE_FONT_FAMILY_MODEL family_model
,
954 IDWriteFontCollection2
**collection
);
955 HRESULT CreateFontSetBuilder
(
956 IDWriteFontSetBuilder2
**builder
);
957 HRESULT CreateTextFormat
(
958 const WCHAR
*familyname
,
959 IDWriteFontCollection
*collection
,
960 DWRITE_FONT_AXIS_VALUE
const *axis_values
,
963 const WCHAR
*localename
,
964 IDWriteTextFormat3
**format
);
970 uuid(35d0e0b3
-9076-4d2e
-a016
-a91b568a06b4
)
972 interface IDWriteFactory7
: IDWriteFactory6
974 HRESULT GetSystemFontSet
(
975 BOOL include_downloadable
,
976 IDWriteFontSet2
**fontset
);
977 HRESULT GetSystemFontCollection
(
978 BOOL include_downloadable
,
979 DWRITE_FONT_FAMILY_MODEL family_model
,
980 IDWriteFontCollection3
**collection
);