winedump: Correctly dump PDB_STREAM_INDEX.segment.
[wine.git] / include / dwrite_3.idl
blobe67c8ab63640febc60aa7482bc1541e753b4472d
1 /*
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,
38 DWRITE_LOCALITY_LOCAL
39 } DWRITE_LOCALITY;
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)))")
85 cpp_quote("#else")
86 cpp_quote("#define DWRITE_MAKE_FONT_AXIS_TAG(a,b,c,d) (DWRITE_MAKE_OPENTYPE_TAG(a,b,c,d))")
87 cpp_quote("#endif")
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;
110 FLOAT value;
111 } DWRITE_FONT_AXIS_VALUE;
113 typedef struct DWRITE_FONT_AXIS_RANGE
115 DWRITE_FONT_AXIS_TAG axisTag;
116 FLOAT minValue;
117 FLOAT maxValue;
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;
140 local,
141 object,
142 uuid(b06fe5b9-43ec-4393-881b-dbe4dc72fda7)
144 interface IDWriteFontDownloadListener : IUnknown
146 void DownloadCompleted(IDWriteFontDownloadQueue *queue, IUnknown *context, HRESULT result);
150 local,
151 object,
152 uuid(b71e6052-5aea-4fa3-832e-f60d431f7e91)
154 interface IDWriteFontDownloadQueue : IUnknown
156 HRESULT AddListener(IDWriteFontDownloadListener *listener, UINT32 *token);
157 HRESULT RemoveListener(UINT32 token);
158 BOOL IsEmpty();
159 HRESULT BeginDownload(IUnknown *context);
160 HRESULT CancelDownload();
161 UINT64 GetGenerationCount();
165 local,
166 object,
167 uuid(b7924baa-391b-412a-8c5c-e44cc2d867dc)
169 interface IDWriteRenderingParams3 : IDWriteRenderingParams2
171 DWRITE_RENDERING_MODE1 GetRenderingMode1();
175 local,
176 object,
177 uuid(cfee3140-1257-47ca-8b85-31bfcf3f2d0e)
179 interface IDWriteStringList : IUnknown
181 UINT32 GetCount();
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);
189 local,
190 object,
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);
212 local,
213 object,
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,
223 UINT32 num_values);
224 HRESULT GetFontAxisRanges(
225 DWRITE_FONT_AXIS_RANGE *ranges,
226 UINT32 num_ranges);
227 DWRITE_FONT_AXIS_ATTRIBUTES GetFontAxisAttributes(
228 UINT32 axis);
229 HRESULT GetAxisNames(
230 UINT32 axis,
231 IDWriteLocalizedStrings **names);
232 UINT32 GetAxisValueNameCount(
233 UINT32 axis);
234 HRESULT GetAxisValueNames(
235 UINT32 axis,
236 UINT32 axis_value,
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,
243 UINT32 num_values,
244 IDWriteFontFace5 **fontface);
245 HRESULT CreateFontFaceReference(
246 DWRITE_FONT_SIMULATIONS simulations,
247 DWRITE_FONT_AXIS_VALUE const *axis_values,
248 UINT32 num_values,
249 IDWriteFontFaceReference1 **reference);
253 local,
254 object,
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,
262 UINT32 num_values,
263 IDWriteFontSet1 **fontset);
264 HRESULT GetFirstFontResources(IDWriteFontSet1 **fontset);
265 HRESULT GetFilteredFonts__(
266 UINT32 const *indices,
267 UINT32 num_indices,
268 IDWriteFontSet1 **fontset);
269 HRESULT GetFilteredFonts_(
270 DWRITE_FONT_AXIS_RANGE const *axis_ranges,
271 UINT32 num_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,
281 UINT32 num_ranges,
282 BOOL select_any_range,
283 UINT32 *indices,
284 UINT32 num_indices,
285 UINT32 *actual_num_indices);
286 HRESULT GetFilteredFontIndices(
287 DWRITE_FONT_PROPERTY const *props,
288 UINT32 num_properties,
289 BOOL select_any_range,
290 UINT32 *indices,
291 UINT32 num_indices,
292 UINT32 *actual_num_indices);
293 HRESULT GetFontAxisRanges_(
294 UINT32 font_index,
295 DWRITE_FONT_AXIS_RANGE *axis_ranges,
296 UINT32 num_ranges,
297 UINT32 *actual_num_ranges);
298 HRESULT GetFontAxisRanges(
299 DWRITE_FONT_AXIS_RANGE *axis_ranges,
300 UINT32 num_ranges,
301 UINT32 *actual_num_ranges);
302 HRESULT GetFontFaceReference(
303 UINT32 index,
304 IDWriteFontFaceReference1 **reference);
305 HRESULT CreateFontResource(
306 UINT32 index,
307 IDWriteFontResource **resource);
308 HRESULT CreateFontFace(
309 UINT32 index,
310 IDWriteFontFace5 **fontface);
311 DWRITE_LOCALITY GetFontLocality(UINT32 index);
315 local,
316 object,
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();
329 local,
330 object,
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);
341 local,
342 object,
343 uuid(3ed49e77-a398-4261-b9cf-c126c2131ef3)
345 interface IDWriteFontFamily2 : IDWriteFontFamily1
347 HRESULT GetMatchingFonts(
348 DWRITE_FONT_AXIS_VALUE const *axis_values,
349 UINT32 num_values,
350 IDWriteFontList2 **fontlist);
351 HRESULT GetFontSet(IDWriteFontSet1 **fontset);
355 local,
356 object,
357 uuid(53585141-d9f8-4095-8321-d73cf6bd116c)
359 interface IDWriteFontCollection1 : IDWriteFontCollection
361 HRESULT GetFontSet(IDWriteFontSet **fontset);
362 HRESULT GetFontFamily(UINT32 index, IDWriteFontFamily1 **family);
366 local,
367 object,
368 uuid(514039c6-4617-4064-bf8b-92ea83e506e0)
370 interface IDWriteFontCollection2 : IDWriteFontCollection1
372 HRESULT GetFontFamily(
373 UINT32 index,
374 IDWriteFontFamily2 **family);
375 HRESULT GetMatchingFonts(
376 const WCHAR *familyname,
377 DWRITE_FONT_AXIS_VALUE const *axis_values,
378 UINT32 num_values,
379 IDWriteFontList2 **fontlist);
380 DWRITE_FONT_FAMILY_MODEL GetFontFamilyModel();
381 HRESULT GetFontSet(IDWriteFontSet1 **fontset);
385 local,
386 object,
387 uuid(a4d055a6-f9e3-4e25-93b7-9e309f3af8e9)
389 interface IDWriteFontCollection3 : IDWriteFontCollection2
391 HANDLE GetExpirationEvent();
395 local,
396 object,
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);
419 local,
420 object,
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,
429 UINT32 num_values);
433 local,
434 object,
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);
445 local,
446 object,
447 uuid(c0763a34-77af-445a-b735-08c37b0a5bf5)
449 interface IDWriteFontList2 : IDWriteFontList1
451 HRESULT GetFontSet(IDWriteFontSet1 **fontset);
455 local,
456 object,
457 uuid(dc7ead19-e54c-43af-b2da-4e2b79ba3f7f)
459 interface IDWriteFontSet2 : IDWriteFontSet1
461 HANDLE GetExpirationEvent();
465 local,
466 object,
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);
477 local,
478 object,
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,
489 float size,
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);
500 local,
501 object,
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,
515 BOOL *exists);
516 BOOL HasCharacter(UINT32 character);
517 HRESULT GetRecommendedRenderingMode(
518 FLOAT emsize,
519 FLOAT dpi_x,
520 FLOAT dpi_y,
521 DWRITE_MATRIX const *transform,
522 BOOL is_sideways,
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
539 UINT32 length;
540 UINT32 trailingWhitespaceLength;
541 UINT32 newlineLength;
542 FLOAT height;
543 FLOAT baseline;
544 BOOL isTrimmed;
545 FLOAT leadingBefore;
546 FLOAT leadingAfter;
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;
559 FLOAT height;
560 FLOAT baseline;
561 FLOAT leadingBefore;
562 DWRITE_FONT_LINE_GAP_USAGE fontLineGapUsage;
563 } DWRITE_LINE_SPACING;
566 local,
567 object,
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);
577 local,
578 object,
579 uuid(6d3b5641-e550-430d-a85b-b7bf48a93427)
581 interface IDWriteTextFormat3 : IDWriteTextFormat2
583 HRESULT SetFontAxisValues(
584 DWRITE_FONT_AXIS_VALUE const *axis_values,
585 UINT32 num_values);
586 UINT32 GetFontAxisValueCount();
587 HRESULT GetFontAxisValues(
588 DWRITE_FONT_AXIS_VALUE *axis_values,
589 UINT32 num_values);
590 DWRITE_AUTOMATIC_FONT_AXES GetAutomaticFontAxes();
591 HRESULT SetAutomaticFontAxes(DWRITE_AUTOMATIC_FONT_AXES axes);
595 local,
596 object,
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);
608 local,
609 object,
610 uuid(05a9bf42-223f-4441-b5fb-8263685f55e9)
612 interface IDWriteTextLayout4 : IDWriteTextLayout3
614 HRESULT SetFontAxisValues(
615 DWRITE_FONT_AXIS_VALUE const *axis_values,
616 UINT32 num_values,
617 DWRITE_TEXT_RANGE range);
618 UINT32 GetFontAxisValueCount(UINT32 pos);
619 HRESULT GetFontAxisValues(
620 UINT32 pos,
621 DWRITE_FONT_AXIS_VALUE *values,
622 UINT32 num_values,
623 DWRITE_TEXT_RANGE *range);
624 DWRITE_AUTOMATIC_FONT_AXES GetAutomaticFontAxes();
625 HRESULT SetAutomaticFontAxes(DWRITE_AUTOMATIC_FONT_AXES axes);
629 local,
630 object,
631 uuid(2397599d-dd0d-4681-bd6a-f4f31eaade77)
633 interface IDWriteFontFallback1 : IDWriteFontFallback
635 HRESULT MapCharacters(
636 IDWriteTextAnalysisSource *source,
637 UINT32 pos,
638 UINT32 length,
639 IDWriteFontCollection *base_collection,
640 const WCHAR *familyname,
641 DWRITE_FONT_AXIS_VALUE const *axis_values,
642 UINT32 num_values,
643 UINT32 *mapped_length,
644 FLOAT *scale,
645 IDWriteFontFace5 **fontface);
649 local,
650 object,
651 uuid(4556be70-3abd-4f70-90be-421780a6f515)
653 interface IDWriteGdiInterop1 : IDWriteGdiInterop
655 HRESULT CreateFontFromLOGFONT(LOGFONTW const *logfont,
656 IDWriteFontCollection *collection,
657 IDWriteFont **font);
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);
669 local,
670 object,
671 uuid(2f642afe-9c68-4f40-b8be-457401afcb3d)
673 interface IDWriteFontSetBuilder : IUnknown
675 HRESULT AddFontFaceReference_(IDWriteFontFaceReference *ref,
676 DWRITE_FONT_PROPERTY const *props,
677 UINT32 prop_count);
678 HRESULT AddFontFaceReference(IDWriteFontFaceReference *ref);
679 HRESULT AddFontSet(IDWriteFontSet *fontset);
680 HRESULT CreateFontSet(IDWriteFontSet **fontset);
684 local,
685 object,
686 uuid(3ff7715f-3cdc-4dc6-9b72-ec5621dccafd)
688 interface IDWriteFontSetBuilder1 : IDWriteFontSetBuilder
690 HRESULT AddFontFile(IDWriteFontFile *file);
694 local,
695 object,
696 uuid(ee5ba612-b131-463c-8f4f-3189b9401e45)
698 interface IDWriteFontSetBuilder2 : IDWriteFontSetBuilder1
700 HRESULT AddFont(
701 IDWriteFontFile *fontfile,
702 UINT32 face_index,
703 DWRITE_FONT_SIMULATIONS simulations,
704 DWRITE_FONT_AXIS_VALUE const *axis_values,
705 UINT32 num_values,
706 DWRITE_FONT_AXIS_RANGE const *axis_ranges,
707 UINT32 num_ranges,
708 DWRITE_FONT_PROPERTY const *props,
709 UINT32 num_properties);
710 HRESULT AddFontFile(const WCHAR *filepath);
714 local,
715 object,
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,
727 FLOAT origin_x,
728 FLOAT origin_y,
729 IDWriteGlyphRunAnalysis **analysis);
731 HRESULT CreateCustomRenderingParams(
732 FLOAT gamma,
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,
745 UINT32 index,
746 DWRITE_FONT_SIMULATIONS simulations,
747 IDWriteFontFaceReference **reference);
749 HRESULT CreateFontFaceReference(
750 WCHAR const *path,
751 FILETIME const *writetime,
752 UINT32 index,
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;
774 UINT32 uniqueDataId;
775 UINT32 pixelsPerEm;
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;
784 local,
785 object,
786 uuid(27f2a904-4eb8-441d-9678-0563f53e3e2f)
788 interface IDWriteFontFace4 : IDWriteFontFace3
790 HRESULT GetGlyphImageFormats_(
791 UINT16 glyph,
792 UINT32 ppem_first,
793 UINT32 ppem_last,
794 DWRITE_GLYPH_IMAGE_FORMATS *formats);
795 DWRITE_GLYPH_IMAGE_FORMATS GetGlyphImageFormats();
796 HRESULT GetGlyphImageData(
797 UINT16 glyph,
798 UINT32 ppem,
799 DWRITE_GLYPH_IMAGE_FORMATS format,
800 DWRITE_GLYPH_IMAGE_DATA *data,
801 void **context);
802 void ReleaseGlyphImageData(void *context);
806 local,
807 object,
808 uuid(98eff3a5-b667-479a-b145-e2fa5b9fdc29)
810 interface IDWriteFontFace5 : IDWriteFontFace4
812 UINT32 GetFontAxisValueCount();
813 HRESULT GetFontAxisValues(
814 DWRITE_FONT_AXIS_VALUE *values,
815 UINT32 value_count);
816 BOOL HasVariations();
817 HRESULT GetFontResource(IDWriteFontResource **resource);
818 BOOL Equals(IDWriteFontFace *fontface);
822 local,
823 object,
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")
839 cpp_quote("{")
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;")
848 cpp_quote("#endif")
849 cpp_quote(" DWRITE_GLYPH_IMAGE_FORMATS glyphImageFormat;")
850 cpp_quote(" DWRITE_MEASURING_MODE measuringMode;")
851 cpp_quote("};")
854 local,
855 object,
856 uuid(7c5f86da-c7a1-4f05-b8e1-55a179fe5a35)
858 interface IDWriteColorGlyphRunEnumerator1 : IDWriteColorGlyphRunEnumerator
860 HRESULT GetCurrentRun(
861 DWRITE_COLOR_GLYPH_RUN1 const **run);
865 local,
866 object,
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,
878 UINT32 palette,
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);
895 local,
896 object,
897 uuid(ce25f8fd-863b-4d13-9651-c1f88dc73fe2)
899 interface IDWriteAsyncResult : IUnknown
901 HANDLE GetWaitHandle();
902 HRESULT GetResult();
905 typedef struct DWRITE_FILE_FRAGMENT
907 UINT64 fileOffset;
908 UINT64 fragmentSize;
909 } DWRITE_FILE_FRAGMENT;
912 local,
913 object,
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;
936 local,
937 object,
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);
952 local,
953 object,
954 uuid(dc102f47-a12d-4b1c-822d-9e117e33043f)
956 interface IDWriteInMemoryFontFileLoader : IDWriteFontFileLoader
958 HRESULT CreateInMemoryFontFileReference(
959 IDWriteFactory *factory,
960 void const *data,
961 UINT32 data_size,
962 IUnknown *owner,
963 IDWriteFontFile **fontfile);
964 UINT32 GetFileCount();
968 local,
969 object,
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,
983 void const *data,
984 UINT32 data_size,
985 IDWriteFontFileStream **stream);
989 local,
990 object,
991 uuid(f3744d80-21f7-42eb-b35d-995bc72fc223)
993 interface IDWriteFactory6 : IDWriteFactory5
995 HRESULT CreateFontFaceReference(
996 IDWriteFontFile *file,
997 UINT32 face_index,
998 DWRITE_FONT_SIMULATIONS simulations,
999 DWRITE_FONT_AXIS_VALUE const *axis_values,
1000 UINT32 num_axis,
1001 IDWriteFontFaceReference1 **face_ref);
1002 HRESULT CreateFontResource(
1003 IDWriteFontFile *file,
1004 UINT32 face_index,
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,
1023 UINT32 num_axis,
1024 FLOAT fontsize,
1025 const WCHAR *localename,
1026 IDWriteTextFormat3 **format);
1030 local,
1031 object,
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);