msxml3/tests: Add test saving XML with non-english characters.
[wine.git] / include / dwrite_3.idl
blob3542fbc8f1d43c50136a45f5d6bc9cec45c505ff
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 const *values,
223 UINT32 num_values);
224 HRESULT GetFontAxisRanges(
225 DWRITE_FONT_AXIS_RANGE const *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(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,
492 BOOL *exists);
493 BOOL HasCharacter(UINT32 character);
494 HRESULT GetRecommendedRenderingMode(
495 FLOAT emsize,
496 FLOAT dpi_x,
497 FLOAT dpi_y,
498 DWRITE_MATRIX const *transform,
499 BOOL is_sideways,
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
516 UINT32 length;
517 UINT32 trailingWhitespaceLength;
518 UINT32 newlineLength;
519 FLOAT height;
520 FLOAT baseline;
521 BOOL isTrimmed;
522 FLOAT leadingBefore;
523 FLOAT leadingAfter;
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;
536 FLOAT height;
537 FLOAT baseline;
538 FLOAT leadingBefore;
539 DWRITE_FONT_LINE_GAP_USAGE fontLineGapUsage;
540 } DWRITE_LINE_SPACING;
543 local,
544 object,
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);
554 local,
555 object,
556 uuid(6d3b5641-e550-430d-a85b-b7bf48a93427)
558 interface IDWriteTextFormat3 : IDWriteTextFormat2
560 HRESULT SetFontAxisValues(
561 DWRITE_FONT_AXIS_VALUE const *axis_values,
562 UINT32 num_values);
563 UINT32 GetFontAxisValueCount();
564 HRESULT GetFontAxisValues(
565 DWRITE_FONT_AXIS_VALUE *axis_values,
566 UINT32 num_values);
567 DWRITE_AUTOMATIC_FONT_AXES GetAutomaticFontAxes();
568 HRESULT SetAutomaticFontAxes(DWRITE_AUTOMATIC_FONT_AXES axes);
572 local,
573 object,
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);
585 local,
586 object,
587 uuid(05a9bf42-223f-4441-b5fb-8263685f55e9)
589 interface IDWriteTextLayout4 : IDWriteTextLayout3
591 HRESULT SetFontAxisValues(
592 DWRITE_FONT_AXIS_VALUE const *axis_values,
593 UINT32 num_values,
594 DWRITE_TEXT_RANGE range);
595 UINT32 GetFontAxisValueCount(UINT32 pos);
596 HRESULT GetFontAxisValues(
597 UINT32 pos,
598 DWRITE_FONT_AXIS_VALUE *values,
599 UINT32 num_values,
600 DWRITE_TEXT_RANGE *range);
601 DWRITE_AUTOMATIC_FONT_AXES GetAutomaticFontAxes();
602 HRESULT SetAutomaticFontAxes(DWRITE_AUTOMATIC_FONT_AXES axes);
606 local,
607 object,
608 uuid(2397599d-dd0d-4681-bd6a-f4f31eaade77)
610 interface IDWriteFontFallback1 : IDWriteFontFallback
612 HRESULT MapCharacters(
613 IDWriteTextAnalysisSource *source,
614 UINT32 pos,
615 UINT32 length,
616 IDWriteFontCollection *base_collection,
617 const WCHAR *familyname,
618 DWRITE_FONT_AXIS_VALUE const *axis_values,
619 UINT32 num_values,
620 UINT32 *mapped_length,
621 FLOAT *scale,
622 IDWriteFontFace5 **fontface);
626 local,
627 object,
628 uuid(4556be70-3abd-4f70-90be-421780a6f515)
630 interface IDWriteGdiInterop1 : IDWriteGdiInterop
632 HRESULT CreateFontFromLOGFONT(LOGFONTW const *logfont,
633 IDWriteFontCollection *collection,
634 IDWriteFont **font);
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);
646 local,
647 object,
648 uuid(2f642afe-9c68-4f40-b8be-457401afcb3d)
650 interface IDWriteFontSetBuilder : IUnknown
652 HRESULT AddFontFaceReference_(IDWriteFontFaceReference *ref,
653 DWRITE_FONT_PROPERTY const *props,
654 UINT32 prop_count);
655 HRESULT AddFontFaceReference(IDWriteFontFaceReference *ref);
656 HRESULT AddFontSet(IDWriteFontSet *fontset);
657 HRESULT CreateFontSet(IDWriteFontSet **fontset);
661 local,
662 object,
663 uuid(3ff7715f-3cdc-4dc6-9b72-ec5621dccafd)
665 interface IDWriteFontSetBuilder1 : IDWriteFontSetBuilder
667 HRESULT AddFontFile(IDWriteFontFile *file);
671 local,
672 object,
673 uuid(ee5ba612-b131-463c-8f4f-3189b9401e45)
675 interface IDWriteFontSetBuilder2 : IDWriteFontSetBuilder1
677 HRESULT AddFont(
678 IDWriteFontFile *fontfile,
679 UINT32 face_index,
680 DWRITE_FONT_SIMULATIONS simulations,
681 DWRITE_FONT_AXIS_VALUE const *axis_values,
682 UINT32 num_values,
683 DWRITE_FONT_AXIS_RANGE const *axis_ranges,
684 UINT32 num_ranges,
685 DWRITE_FONT_PROPERTY const *props,
686 UINT32 num_properties);
687 HRESULT AddFontFile(const WCHAR *filepath);
691 local,
692 object,
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,
704 FLOAT origin_x,
705 FLOAT origin_y,
706 IDWriteGlyphRunAnalysis **analysis);
708 HRESULT CreateCustomRenderingParams(
709 FLOAT gamma,
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,
722 UINT32 index,
723 DWRITE_FONT_SIMULATIONS simulations,
724 IDWriteFontFaceReference **reference);
726 HRESULT CreateFontFaceReference(
727 WCHAR const *path,
728 FILETIME const *writetime,
729 UINT32 index,
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;
751 UINT32 uniqueDataId;
752 UINT32 pixelsPerEm;
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;
761 local,
762 object,
763 uuid(27f2a904-4eb8-441d-9678-0563f53e3e2f)
765 interface IDWriteFontFace4 : IDWriteFontFace3
767 HRESULT GetGlyphImageFormats_(
768 UINT16 glyph,
769 UINT32 ppem_first,
770 UINT32 ppem_last,
771 DWRITE_GLYPH_IMAGE_FORMATS *formats);
772 DWRITE_GLYPH_IMAGE_FORMATS GetGlyphImageFormats();
773 HRESULT GetGlyphImageData(
774 UINT16 glyph,
775 UINT32 ppem,
776 DWRITE_GLYPH_IMAGE_FORMATS format,
777 DWRITE_GLYPH_IMAGE_DATA *data,
778 void **context);
779 void ReleaseGlyphImageData(void *context);
783 local,
784 object,
785 uuid(98eff3a5-b667-479a-b145-e2fa5b9fdc29)
787 interface IDWriteFontFace5 : IDWriteFontFace4
789 UINT32 GetFontAxisValueCount();
790 HRESULT GetFontAxisValues(
791 DWRITE_FONT_AXIS_VALUE *values,
792 UINT32 value_count);
793 BOOL HasVariations();
794 HRESULT GetFontResource(IDWriteFontResource **resource);
795 BOOL Equals(IDWriteFontFace *fontface);
798 typedef struct DWRITE_COLOR_GLYPH_RUN1 DWRITE_COLOR_GLYPH_RUN1;
800 cpp_quote("struct DWRITE_COLOR_GLYPH_RUN1")
801 cpp_quote("{")
802 cpp_quote(" DWRITE_GLYPH_RUN glyphRun;")
803 cpp_quote(" DWRITE_GLYPH_RUN_DESCRIPTION *glyphRunDescription;")
804 cpp_quote(" FLOAT baselineOriginX;")
805 cpp_quote(" FLOAT baselineOriginY;")
806 cpp_quote(" DWRITE_COLOR_F runColor;")
807 cpp_quote(" UINT16 paletteIndex;")
808 cpp_quote("#ifdef _WIN64")
809 cpp_quote(" UINT32 _pad;")
810 cpp_quote("#endif")
811 cpp_quote(" DWRITE_GLYPH_IMAGE_FORMATS glyphImageFormat;")
812 cpp_quote(" DWRITE_MEASURING_MODE measuringMode;")
813 cpp_quote("};")
816 local,
817 object,
818 uuid(7c5f86da-c7a1-4f05-b8e1-55a179fe5a35)
820 interface IDWriteColorGlyphRunEnumerator1 : IDWriteColorGlyphRunEnumerator
822 HRESULT GetCurrentRun(
823 DWRITE_COLOR_GLYPH_RUN1 const **run);
827 local,
828 object,
829 uuid(4b0b5bd3-0797-4549-8ac5-fe915cc53856)
831 interface IDWriteFactory4 : IDWriteFactory3
833 HRESULT TranslateColorGlyphRun(
834 D2D1_POINT_2F baseline_origin,
835 DWRITE_GLYPH_RUN const *run,
836 DWRITE_GLYPH_RUN_DESCRIPTION const *run_desc,
837 DWRITE_GLYPH_IMAGE_FORMATS desired_formats,
838 DWRITE_MEASURING_MODE measuring_mode,
839 DWRITE_MATRIX const *transform,
840 UINT32 palette,
841 IDWriteColorGlyphRunEnumerator1 **layers);
843 HRESULT ComputeGlyphOrigins_(
844 DWRITE_GLYPH_RUN const *run,
845 D2D1_POINT_2F baseline_origin,
846 D2D1_POINT_2F *origins);
848 HRESULT ComputeGlyphOrigins(
849 DWRITE_GLYPH_RUN const *run,
850 DWRITE_MEASURING_MODE measuring_mode,
851 D2D1_POINT_2F baseline_origin,
852 DWRITE_MATRIX const *transform,
853 D2D1_POINT_2F *origins);
857 local,
858 object,
859 uuid(ce25f8fd-863b-4d13-9651-c1f88dc73fe2)
861 interface IDWriteAsyncResult : IUnknown
863 HANDLE GetWaitHandle();
864 HRESULT GetResult();
867 typedef struct DWRITE_FILE_FRAGMENT
869 UINT64 fileOffset;
870 UINT64 fragmentSize;
871 } DWRITE_FILE_FRAGMENT;
874 local,
875 object,
876 uuid(4db3757a-2c72-4ed9-b2b6-1ababe1aff9c)
878 interface IDWriteRemoteFontFileStream : IDWriteFontFileStream
880 HRESULT GetLocalFileSize(UINT64 *size);
881 HRESULT GetFileFragmentLocality(UINT64 offset, UINT64 size, BOOL *is_local, UINT64 *partial_size);
882 DWRITE_LOCALITY GetLocality();
883 HRESULT BeginDownload(
884 GUID const *operation_id,
885 DWRITE_FILE_FRAGMENT const *fragments,
886 UINT32 fragment_count,
887 IDWriteAsyncResult **async_result);
890 typedef enum DWRITE_CONTAINER_TYPE
892 DWRITE_CONTAINER_TYPE_UNKNOWN,
893 DWRITE_CONTAINER_TYPE_WOFF,
894 DWRITE_CONTAINER_TYPE_WOFF2,
895 } DWRITE_CONTAINER_TYPE;
898 local,
899 object,
900 uuid(68648c83-6ede-46c0-ab46-20083a887fde)
902 interface IDWriteRemoteFontFileLoader : IDWriteFontFileLoader
904 HRESULT CreateRemoteStreamFromKey(void const *key, UINT32 key_size, IDWriteRemoteFontFileStream **stream);
905 HRESULT GetLocalityFromKey(void const *key, UINT32 key_size, DWRITE_LOCALITY *locality);
906 HRESULT CreateFontFileReferenceFromUrl(
907 IDWriteFactory *factory,
908 WCHAR const *base_url,
909 WCHAR const *file_url,
910 IDWriteFontFile **fontfile);
914 local,
915 object,
916 uuid(dc102f47-a12d-4b1c-822d-9e117e33043f)
918 interface IDWriteInMemoryFontFileLoader : IDWriteFontFileLoader
920 HRESULT CreateInMemoryFontFileReference(
921 IDWriteFactory *factory,
922 void const *data,
923 UINT32 data_size,
924 IUnknown *owner,
925 IDWriteFontFile **fontfile);
926 UINT32 GetFileCount();
930 local,
931 object,
932 uuid(958db99a-be2a-4f09-af7d-65189803d1d3)
934 interface IDWriteFactory5 : IDWriteFactory4
936 HRESULT CreateFontSetBuilder(IDWriteFontSetBuilder1 **fontset_builder);
937 HRESULT CreateInMemoryFontFileLoader(IDWriteInMemoryFontFileLoader **loader);
938 HRESULT CreateHttpFontFileLoader(
939 WCHAR const *referrer_url,
940 WCHAR const *extra_headers,
941 IDWriteRemoteFontFileLoader **loader);
942 DWRITE_CONTAINER_TYPE AnalyzeContainerType(void const *data, UINT32 data_size);
943 HRESULT UnpackFontFile(
944 DWRITE_CONTAINER_TYPE container_type,
945 void const *data,
946 UINT32 data_size,
947 IDWriteFontFileStream **stream);
951 local,
952 object,
953 uuid(f3744d80-21f7-42eb-b35d-995bc72fc223)
955 interface IDWriteFactory6 : IDWriteFactory5
957 HRESULT CreateFontFaceReference(
958 IDWriteFontFile *file,
959 UINT32 face_index,
960 DWRITE_FONT_SIMULATIONS simulations,
961 DWRITE_FONT_AXIS_VALUE const *axis_values,
962 UINT32 num_axis,
963 IDWriteFontFaceReference1 **face_ref);
964 HRESULT CreateFontResource(
965 IDWriteFontFile *file,
966 UINT32 face_index,
967 IDWriteFontResource **resource);
968 HRESULT GetSystemFontSet(
969 BOOL include_downloadable,
970 IDWriteFontSet1 **fontset);
971 HRESULT GetSystemFontCollection(
972 BOOL include_downloadable,
973 DWRITE_FONT_FAMILY_MODEL family_model,
974 IDWriteFontCollection2 **collection);
975 HRESULT CreateFontCollectionFromFontSet(
976 IDWriteFontSet *fontset,
977 DWRITE_FONT_FAMILY_MODEL family_model,
978 IDWriteFontCollection2 **collection);
979 HRESULT CreateFontSetBuilder(
980 IDWriteFontSetBuilder2 **builder);
981 HRESULT CreateTextFormat(
982 const WCHAR *familyname,
983 IDWriteFontCollection *collection,
984 DWRITE_FONT_AXIS_VALUE const *axis_values,
985 UINT32 num_axis,
986 FLOAT fontsize,
987 const WCHAR *localename,
988 IDWriteTextFormat3 **format);
992 local,
993 object,
994 uuid(35d0e0b3-9076-4d2e-a016-a91b568a06b4)
996 interface IDWriteFactory7 : IDWriteFactory6
998 HRESULT GetSystemFontSet(
999 BOOL include_downloadable,
1000 IDWriteFontSet2 **fontset);
1001 HRESULT GetSystemFontCollection(
1002 BOOL include_downloadable,
1003 DWRITE_FONT_FAMILY_MODEL family_model,
1004 IDWriteFontCollection3 **collection);