opengl32: Make wgl driver entry points WINAPI.
[wine/zf.git] / include / dwrite_3.idl
blob54d204f39fbe9dd269c5adaf68d85720a75bceda
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 typedef enum DWRITE_FONT_AXIS_TAG
85 DWRITE_FONT_AXIS_TAG_WEIGHT = 0x74686777, /* 'wght' */
86 DWRITE_FONT_AXIS_TAG_WIDTH = 0x68746477, /* 'wdth' */
87 DWRITE_FONT_AXIS_TAG_SLANT = 0x746e6c73, /* 'slnt' */
88 DWRITE_FONT_AXIS_TAG_OPTICAL_SIZE = 0x7a73706f, /* 'opsz' */
89 DWRITE_FONT_AXIS_TAG_ITALIC = 0x6c617469, /* 'ital' */
90 } DWRITE_FONT_AXIS_TAG;
92 typedef enum DWRITE_FONT_SOURCE_TYPE
94 DWRITE_FONT_SOURCE_TYPE_UNKNOWN,
95 DWRITE_FONT_SOURCE_TYPE_PER_MACHINE,
96 DWRITE_FONT_SOURCE_TYPE_PER_USER,
97 DWRITE_FONT_SOURCE_TYPE_APPX_PACKAGE,
98 DWRITE_FONT_SOURCE_TYPE_REMOTE_FONT_PROVIDER
99 } DWRITE_FONT_SOURCE_TYPE;
101 typedef struct DWRITE_FONT_AXIS_VALUE
103 DWRITE_FONT_AXIS_TAG axisTag;
104 FLOAT value;
105 } DWRITE_FONT_AXIS_VALUE;
107 typedef struct DWRITE_FONT_AXIS_RANGE
109 DWRITE_FONT_AXIS_TAG axisTag;
110 FLOAT minValue;
111 FLOAT maxValue;
112 } DWRITE_FONT_AXIS_RANGE;
114 typedef enum DWRITE_AUTOMATIC_FONT_AXES
116 DWRITE_AUTOMATIC_FONT_AXES_NONE,
117 DWRITE_AUTOMATIC_FONT_AXES_OPTICAL_SIZE,
118 } DWRITE_AUTOMATIC_FONT_AXES;
120 typedef enum DWRITE_FONT_AXIS_ATTRIBUTES
122 DWRITE_FONT_AXIS_ATTRIBUTES_NONE,
123 DWRITE_FONT_AXIS_ATTRIBUTES_VARIABLE,
124 DWRITE_FONT_AXIS_ATTRIBUTES_HIDDEN,
125 } DWRITE_FONT_AXIS_ATTRIBUTES;
127 typedef enum DWRITE_FONT_FAMILY_MODEL
129 DWRITE_FONT_FAMILY_MODEL_TYPOGRAPHIC,
130 DWRITE_FONT_FAMILY_MODEL_WEIGHT_STRETCH_STYLE,
131 } DWRITE_FONT_FAMILY_MODEL;
134 local,
135 object,
136 uuid(b06fe5b9-43ec-4393-881b-dbe4dc72fda7)
138 interface IDWriteFontDownloadListener : IUnknown
140 void DownloadCompleted(IDWriteFontDownloadQueue *queue, IUnknown *context, HRESULT result);
144 local,
145 object,
146 uuid(b71e6052-5aea-4fa3-832e-f60d431f7e91)
148 interface IDWriteFontDownloadQueue : IUnknown
150 HRESULT AddListener(IDWriteFontDownloadListener *listener, UINT32 *token);
151 HRESULT RemoveListener(UINT32 token);
152 BOOL IsEmpty();
153 HRESULT BeginDownload(IUnknown *context);
154 HRESULT CancelDownload();
155 UINT64 GetGenerationCount();
159 local,
160 object,
161 uuid(b7924baa-391b-412a-8c5c-e44cc2d867dc)
163 interface IDWriteRenderingParams3 : IDWriteRenderingParams2
165 DWRITE_RENDERING_MODE1 GetRenderingMode1();
169 local,
170 object,
171 uuid(cfee3140-1257-47ca-8b85-31bfcf3f2d0e)
173 interface IDWriteStringList : IUnknown
175 UINT32 GetCount();
176 HRESULT GetLocaleNameLength(UINT32 index, UINT32 *length);
177 HRESULT GetLocaleName(UINT32 index, WCHAR *name, UINT32 size);
178 HRESULT GetStringLength(UINT32 index, UINT32 *length);
179 HRESULT GetString(UINT32 index, WCHAR *string, UINT32 size);
183 local,
184 object,
185 uuid(53585141-d9f8-4095-8321-d73cf6bd116b)
187 interface IDWriteFontSet : IUnknown
189 UINT32 GetFontCount();
190 HRESULT GetFontFaceReference(UINT32 index, IDWriteFontFaceReference **reference);
191 HRESULT FindFontFaceReference(IDWriteFontFaceReference *reference,
192 UINT32 *index, BOOL *exists);
193 HRESULT FindFontFace(IDWriteFontFace *fontface, UINT32 *index, BOOL *exists);
194 HRESULT GetPropertyValues__(DWRITE_FONT_PROPERTY_ID id, IDWriteStringList **values);
195 HRESULT GetPropertyValues_(DWRITE_FONT_PROPERTY_ID id,
196 WCHAR const *preferred_locales, IDWriteStringList **values);
197 HRESULT GetPropertyValues(UINT32 index, DWRITE_FONT_PROPERTY_ID id, BOOL *exists,
198 IDWriteLocalizedStrings **values);
199 HRESULT GetPropertyOccurrenceCount(DWRITE_FONT_PROPERTY const *property, UINT32 *count);
200 HRESULT GetMatchingFonts_(WCHAR const *family, DWRITE_FONT_WEIGHT weight, DWRITE_FONT_STRETCH stretch,
201 DWRITE_FONT_STYLE style, IDWriteFontSet **fontset);
202 HRESULT GetMatchingFonts(DWRITE_FONT_PROPERTY const *props, UINT32 count, IDWriteFontSet **fontset);
206 local,
207 object,
208 uuid(1f803a76-6871-48e8-987f-b975551c50f2)
210 interface IDWriteFontResource : IUnknown
212 HRESULT GetFontFile(IDWriteFontFile **fontfile);
213 UINT32 GetFontFaceIndex();
214 UINT32 GetFontAxisCount();
215 HRESULT GetDefaultFontAxisValues(
216 DWRITE_FONT_AXIS_VALUE const *values,
217 UINT32 num_values);
218 HRESULT GetFontAxisRanges(
219 DWRITE_FONT_AXIS_RANGE const *ranges,
220 UINT32 num_ranges);
221 DWRITE_FONT_AXIS_ATTRIBUTES GetFontAxisAttributes(
222 UINT32 axis);
223 HRESULT GetAxisNames(
224 UINT32 axis,
225 IDWriteLocalizedStrings **names);
226 UINT32 GetAxisValueNameCount(
227 UINT32 axis);
228 HRESULT GetAxisValueNames(
229 UINT32 axis,
230 UINT32 axis_value,
231 DWRITE_FONT_AXIS_RANGE *axis_range,
232 IDWriteLocalizedStrings **names);
233 BOOL HasVariations();
234 HRESULT CreateFontFace(
235 DWRITE_FONT_SIMULATIONS simulations,
236 DWRITE_FONT_AXIS_VALUE const *axis_values,
237 UINT32 num_values,
238 IDWriteFontFace5 **fontface);
239 HRESULT CreateFontFaceReference(
240 DWRITE_FONT_SIMULATIONS simulations,
241 DWRITE_FONT_AXIS_VALUE const *axis_values,
242 UINT32 num_values,
243 IDWriteFontFaceReference1 **reference);
247 local,
248 object,
249 uuid(7e9fda85-6c92-4053-bc47-7ae3530db4d3)
251 interface IDWriteFontSet1 : IDWriteFontSet
253 HRESULT GetMatchingFonts(
254 DWRITE_FONT_PROPERTY const *property,
255 DWRITE_FONT_AXIS_VALUE const *axis_values,
256 UINT32 num_values,
257 IDWriteFontSet1 **fontset);
258 HRESULT GetFirstFontResources(IDWriteFontSet1 **fontset);
259 HRESULT GetFilteredFonts__(
260 UINT32 const *indices,
261 UINT32 num_indices,
262 IDWriteFontSet1 **fontset);
263 HRESULT GetFilteredFonts_(
264 DWRITE_FONT_AXIS_RANGE const *axis_ranges,
265 UINT32 num_ranges,
266 BOOL select_any_range,
267 IDWriteFontSet1 **fontset);
268 HRESULT GetFilteredFonts(
269 DWRITE_FONT_PROPERTY const *props,
270 UINT32 num_properties,
271 BOOL select_any_property,
272 IDWriteFontSet1 **fontset);
273 HRESULT GetFilteredFontIndices_(
274 DWRITE_FONT_AXIS_RANGE const *ranges,
275 UINT32 num_ranges,
276 BOOL select_any_range,
277 UINT32 *indices,
278 UINT32 num_indices,
279 UINT32 *actual_num_indices);
280 HRESULT GetFilteredFontIndices(
281 DWRITE_FONT_PROPERTY const *props,
282 UINT32 num_properties,
283 BOOL select_any_range,
284 UINT32 *indices,
285 UINT32 num_indices,
286 UINT32 *actual_num_indices);
287 HRESULT GetFontAxisRanges_(
288 UINT32 font_index,
289 DWRITE_FONT_AXIS_RANGE *axis_ranges,
290 UINT32 num_ranges,
291 UINT32 *actual_num_ranges);
292 HRESULT GetFontAxisRanges(
293 DWRITE_FONT_AXIS_RANGE *axis_ranges,
294 UINT32 num_ranges,
295 UINT32 *actual_num_ranges);
296 HRESULT GetFontFaceReference(
297 UINT32 index,
298 IDWriteFontFaceReference1 **reference);
299 HRESULT CreateFontResource(
300 UINT32 index,
301 IDWriteFontResource **resource);
302 HRESULT CreateFontFace(
303 UINT32 index,
304 IDWriteFontFace5 **fontface);
305 DWRITE_LOCALITY GetFontLocality(UINT32 index);
309 local,
310 object,
311 uuid(29748ed6-8c9c-4a6a-be0b-d912e8538944)
313 interface IDWriteFont3 : IDWriteFont2
315 HRESULT CreateFontFace(IDWriteFontFace3 **fontface);
316 BOOL Equals(IDWriteFont *font);
317 HRESULT GetFontFaceReference(IDWriteFontFaceReference **reference);
318 BOOL HasCharacter(UINT32 character);
319 DWRITE_LOCALITY GetLocality();
323 local,
324 object,
325 uuid(da20d8ef-812a-4c43-9802-62ec4abd7adf)
327 interface IDWriteFontFamily1 : IDWriteFontFamily
329 DWRITE_LOCALITY GetFontLocality(UINT32 index);
330 HRESULT GetFont(UINT32 index, IDWriteFont3 **font);
331 HRESULT GetFontFaceReference(UINT32 index, IDWriteFontFaceReference **reference);
335 local,
336 object,
337 uuid(3ed49e77-a398-4261-b9cf-c126c2131ef3)
339 interface IDWriteFontFamily2 : IDWriteFontFamily1
341 HRESULT GetMatchingFonts(
342 DWRITE_FONT_AXIS_VALUE const *axis_values,
343 UINT32 num_values,
344 IDWriteFontList2 **fontlist);
345 HRESULT GetFontSet(IDWriteFontSet1 **fontset);
349 local,
350 object,
351 uuid(53585141-d9f8-4095-8321-d73cf6bd116c)
353 interface IDWriteFontCollection1 : IDWriteFontCollection
355 HRESULT GetFontSet(IDWriteFontSet **fontset);
356 HRESULT GetFontFamily(UINT32 index, IDWriteFontFamily1 **family);
360 local,
361 object,
362 uuid(514039c6-4617-4064-bf8b-92ea83e506e0)
364 interface IDWriteFontCollection2 : IDWriteFontCollection1
366 HRESULT GetFontFamily(
367 UINT32 index,
368 IDWriteFontFamily2 **family);
369 HRESULT GetMatchingFonts(
370 const WCHAR *familyname,
371 DWRITE_FONT_AXIS_VALUE const *axis_values,
372 UINT32 num_values,
373 IDWriteFontList2 **fontlist);
374 DWRITE_FONT_FAMILY_MODEL GetFontFamilyModel();
375 HRESULT GetFontSet(IDWriteFontSet1 **fontset);
379 local,
380 object,
381 uuid(a4d055a6-f9e3-4e25-93b7-9e309f3af8e9)
383 interface IDWriteFontCollection3 : IDWriteFontCollection2
385 HANDLE GetExpirationEvent();
389 local,
390 object,
391 uuid(5e7fa7ca-dde3-424c-89f0-9fcd6fed58cd)
393 interface IDWriteFontFaceReference : IUnknown
395 HRESULT CreateFontFace(IDWriteFontFace3 **fontface);
396 HRESULT CreateFontFaceWithSimulations(DWRITE_FONT_SIMULATIONS simulations,
397 IDWriteFontFace3 **fontface);
398 BOOL Equals(IDWriteFontFaceReference *reference);
399 UINT32 GetFontFaceIndex();
400 DWRITE_FONT_SIMULATIONS GetSimulations();
401 HRESULT GetFontFile(IDWriteFontFile **fontfile);
402 UINT64 GetLocalFileSize();
403 UINT64 GetFileSize();
404 HRESULT GetFileTime(FILETIME *writetime);
405 DWRITE_LOCALITY GetLocality();
406 HRESULT EnqueueFontDownloadRequest();
407 HRESULT EnqueueCharacterDownloadRequest(WCHAR const *chars, UINT32 count);
408 HRESULT EnqueueGlyphDownloadRequest(UINT16 const *glyphs, UINT32 count);
409 HRESULT EnqueueFileFragmentDownloadRequest(UINT64 offset, UINT64 size);
413 local,
414 object,
415 uuid(c081fe77-2fd1-41ac-a5a3-34983c4ba61a)
417 interface IDWriteFontFaceReference1 : IDWriteFontFaceReference
419 HRESULT CreateFontFace(IDWriteFontFace5 **fontface);
420 UINT32 GetFontAxisValueCount();
421 HRESULT GetFontAxisValues(
422 DWRITE_FONT_AXIS_VALUE *values,
423 UINT32 num_values);
427 local,
428 object,
429 uuid(da20d8ef-812a-4c43-9802-62ec4abd7ade)
431 interface IDWriteFontList1 : IDWriteFontList
433 DWRITE_LOCALITY GetFontLocality(UINT32 index);
434 HRESULT GetFont(UINT32 index, IDWriteFont3 **font);
435 HRESULT GetFontFaceReference(UINT32 index, IDWriteFontFaceReference **reference);
439 local,
440 object,
441 uuid(c0763a34-77af-445a-b735-08c37b0a5bf5)
443 interface IDWriteFontList2 : IDWriteFontList1
445 HRESULT GetFontSet(IDWriteFontSet1 **fontset);
449 local,
450 object,
451 uuid(dc7ead19-e54c-43af-b2da-4e2b79ba3f7f)
453 interface IDWriteFontSet2 : IDWriteFontSet1
455 HANDLE GetExpirationEvent();
459 local,
460 object,
461 uuid(7c073ef2-a7f4-4045-8c32-8ab8ae640f90)
463 interface IDWriteFontSet3 : IDWriteFontSet2
465 DWRITE_FONT_SOURCE_TYPE GetFontSourceType(UINT32 index);
466 UINT32 GetFontSourceNameLength(UINT32 index);
467 HRESULT GetFontSourceName(UINT32 index, WCHAR *buffer, UINT32 buffer_size);
471 local,
472 object,
473 uuid(d37d7598-09be-4222-a236-2081341cc1f2)
475 interface IDWriteFontFace3 : IDWriteFontFace2
477 HRESULT GetFontFaceReference(IDWriteFontFaceReference **reference);
478 void GetPanose(DWRITE_PANOSE *panose);
479 DWRITE_FONT_WEIGHT GetWeight();
480 DWRITE_FONT_STRETCH GetStretch();
481 DWRITE_FONT_STYLE GetStyle();
482 HRESULT GetFamilyNames(IDWriteLocalizedStrings **names);
483 HRESULT GetFaceNames(IDWriteLocalizedStrings **names);
484 HRESULT GetInformationalStrings(DWRITE_INFORMATIONAL_STRING_ID stringid,
485 IDWriteLocalizedStrings **strings,
486 BOOL *exists);
487 BOOL HasCharacter(UINT32 character);
488 HRESULT GetRecommendedRenderingMode(
489 FLOAT emsize,
490 FLOAT dpi_x,
491 FLOAT dpi_y,
492 DWRITE_MATRIX const *transform,
493 BOOL is_sideways,
494 DWRITE_OUTLINE_THRESHOLD threshold,
495 DWRITE_MEASURING_MODE measuring_mode,
496 IDWriteRenderingParams *params,
497 DWRITE_RENDERING_MODE1 *rendering_mode,
498 DWRITE_GRID_FIT_MODE *gridfit_mode);
499 BOOL IsCharacterLocal(UINT32 character);
500 BOOL IsGlyphLocal(UINT16 glyph);
501 HRESULT AreCharactersLocal(WCHAR const *characters,
502 UINT32 count, BOOL enqueue_if_not, BOOL *are_local);
503 HRESULT AreGlyphsLocal(UINT16 const *glyphs, UINT32 count,
504 BOOL enqueue_if_not, BOOL *are_local);
508 typedef struct DWRITE_LINE_METRICS1
510 UINT32 length;
511 UINT32 trailingWhitespaceLength;
512 UINT32 newlineLength;
513 FLOAT height;
514 FLOAT baseline;
515 BOOL isTrimmed;
516 FLOAT leadingBefore;
517 FLOAT leadingAfter;
518 } DWRITE_LINE_METRICS1;
520 typedef enum DWRITE_FONT_LINE_GAP_USAGE
522 DWRITE_FONT_LINE_GAP_USAGE_DEFAULT,
523 DWRITE_FONT_LINE_GAP_USAGE_DISABLED,
524 DWRITE_FONT_LINE_GAP_USAGE_ENABLED
525 } DWRITE_FONT_LINE_GAP_USAGE;
527 typedef struct DWRITE_LINE_SPACING
529 DWRITE_LINE_SPACING_METHOD method;
530 FLOAT height;
531 FLOAT baseline;
532 FLOAT leadingBefore;
533 DWRITE_FONT_LINE_GAP_USAGE fontLineGapUsage;
534 } DWRITE_LINE_SPACING;
537 local,
538 object,
539 uuid(f67e0edd-9e3d-4ecc-8c32-4183253dfe70)
541 interface IDWriteTextFormat2 : IDWriteTextFormat1
543 HRESULT SetLineSpacing(DWRITE_LINE_SPACING const *spacing);
544 HRESULT GetLineSpacing(DWRITE_LINE_SPACING *spacing);
548 local,
549 object,
550 uuid(6d3b5641-e550-430d-a85b-b7bf48a93427)
552 interface IDWriteTextFormat3 : IDWriteTextFormat2
554 HRESULT SetFontAxisValues(
555 DWRITE_FONT_AXIS_VALUE const *axis_values,
556 UINT32 num_values);
557 UINT32 GetFontAxisValueCount();
558 HRESULT GetFontAxisValues(
559 DWRITE_FONT_AXIS_VALUE const *axis_values,
560 UINT32 num_values);
561 DWRITE_AUTOMATIC_FONT_AXES GetAutomaticFontAxes();
562 HRESULT SetAutomaticFontAxes(DWRITE_AUTOMATIC_FONT_AXES axes);
566 local,
567 object,
568 uuid(07ddcd52-020e-4de8-ac33-6c953d83f92d)
570 interface IDWriteTextLayout3 : IDWriteTextLayout2
572 HRESULT InvalidateLayout();
573 HRESULT SetLineSpacing(DWRITE_LINE_SPACING const *spacing);
574 HRESULT GetLineSpacing(DWRITE_LINE_SPACING *spacing);
575 HRESULT GetLineMetrics(DWRITE_LINE_METRICS1 *metrics, UINT32 max_count, UINT32 *count);
579 local,
580 object,
581 uuid(05a9bf42-223f-4441-b5fb-8263685f55e9)
583 interface IDWriteTextLayout4 : IDWriteTextLayout3
585 HRESULT SetFontAxisValues(
586 DWRITE_FONT_AXIS_VALUE const *axis_values,
587 UINT32 num_values,
588 DWRITE_TEXT_RANGE range);
589 UINT32 GetFontAxisValueCount(UINT32 pos);
590 HRESULT GetFontAxisValues(
591 UINT32 pos,
592 DWRITE_FONT_AXIS_VALUE *values,
593 UINT32 num_values,
594 DWRITE_TEXT_RANGE *range);
595 DWRITE_AUTOMATIC_FONT_AXES GetAutomaticFontAxes();
596 HRESULT SetAutomaticFontAxes(DWRITE_AUTOMATIC_FONT_AXES axes);
600 local,
601 object,
602 uuid(2397599d-dd0d-4681-bd6a-f4f31eaade77)
604 interface IDWriteFontFallback1 : IDWriteFontFallback
606 HRESULT MapCharacters(
607 IDWriteTextAnalysisSource *source,
608 UINT32 pos,
609 UINT32 length,
610 IDWriteFontCollection *base_collection,
611 const WCHAR *familyname,
612 DWRITE_FONT_AXIS_VALUE const *axis_values,
613 UINT32 num_values,
614 UINT32 *mapped_length,
615 FLOAT *scale,
616 IDWriteFontFace5 **fontface);
620 local,
621 object,
622 uuid(4556be70-3abd-4f70-90be-421780a6f515)
624 interface IDWriteGdiInterop1 : IDWriteGdiInterop
626 HRESULT CreateFontFromLOGFONT(LOGFONTW const *logfont,
627 IDWriteFontCollection *collection,
628 IDWriteFont **font);
630 /* GetFontSignature() methods are listed in reversed order to make
631 resulting vtable order compatible. */
632 HRESULT GetFontSignature_(IDWriteFontFace *fontface, FONTSIGNATURE *fontsig);
633 HRESULT GetFontSignature(IDWriteFont *font, FONTSIGNATURE *fontsig);
634 HRESULT GetMatchingFontsByLOGFONT(LOGFONTW const *logfont,
635 IDWriteFontSet *fontset,
636 IDWriteFontSet **subset);
640 local,
641 object,
642 uuid(2f642afe-9c68-4f40-b8be-457401afcb3d)
644 interface IDWriteFontSetBuilder : IUnknown
646 HRESULT AddFontFaceReference_(IDWriteFontFaceReference *ref,
647 DWRITE_FONT_PROPERTY const *props,
648 UINT32 prop_count);
649 HRESULT AddFontFaceReference(IDWriteFontFaceReference *ref);
650 HRESULT AddFontSet(IDWriteFontSet *fontset);
651 HRESULT CreateFontSet(IDWriteFontSet **fontset);
655 local,
656 object,
657 uuid(3ff7715f-3cdc-4dc6-9b72-ec5621dccafd)
659 interface IDWriteFontSetBuilder1 : IDWriteFontSetBuilder
661 HRESULT AddFontFile(IDWriteFontFile *file);
665 local,
666 object,
667 uuid(ee5ba612-b131-463c-8f4f-3189b9401e45)
669 interface IDWriteFontSetBuilder2 : IDWriteFontSetBuilder1
671 HRESULT AddFont(
672 IDWriteFontFile *fontfile,
673 UINT32 face_index,
674 DWRITE_FONT_SIMULATIONS simulations,
675 DWRITE_FONT_AXIS_VALUE const *axis_values,
676 UINT32 num_values,
677 DWRITE_FONT_AXIS_RANGE const *axis_ranges,
678 UINT32 num_ranges,
679 DWRITE_FONT_PROPERTY const *props,
680 UINT32 num_properties);
681 HRESULT AddFontFile(const WCHAR *filepath);
685 local,
686 object,
687 uuid(9a1b41c3-d3bb-466a-87fc-fe67556a3b65)
689 interface IDWriteFactory3 : IDWriteFactory2
691 HRESULT CreateGlyphRunAnalysis(
692 DWRITE_GLYPH_RUN const *run,
693 DWRITE_MATRIX const *transform,
694 DWRITE_RENDERING_MODE1 rendering_mode,
695 DWRITE_MEASURING_MODE measuring_mode,
696 DWRITE_GRID_FIT_MODE gridfit_mode,
697 DWRITE_TEXT_ANTIALIAS_MODE antialias_mode,
698 FLOAT origin_x,
699 FLOAT origin_y,
700 IDWriteGlyphRunAnalysis **analysis);
702 HRESULT CreateCustomRenderingParams(
703 FLOAT gamma,
704 FLOAT enhanced_contrast,
705 FLOAT grayscale_enhanced_contrast,
706 FLOAT cleartype_level,
707 DWRITE_PIXEL_GEOMETRY pixel_geometry,
708 DWRITE_RENDERING_MODE1 rendering_mode,
709 DWRITE_GRID_FIT_MODE gridfit_mode,
710 IDWriteRenderingParams3 **params);
712 /* CreateFontFaceReference methods are listed in reversed order to make
713 resulting vtable order compatible. */
714 HRESULT CreateFontFaceReference_(
715 IDWriteFontFile *file,
716 UINT32 index,
717 DWRITE_FONT_SIMULATIONS simulations,
718 IDWriteFontFaceReference **reference);
720 HRESULT CreateFontFaceReference(
721 WCHAR const *path,
722 FILETIME const *writetime,
723 UINT32 index,
724 DWRITE_FONT_SIMULATIONS simulations,
725 IDWriteFontFaceReference **reference);
727 HRESULT GetSystemFontSet(IDWriteFontSet **fontset);
728 HRESULT CreateFontSetBuilder(IDWriteFontSetBuilder **builder);
729 HRESULT CreateFontCollectionFromFontSet(
730 IDWriteFontSet *fontset,
731 IDWriteFontCollection1 **collection);
733 HRESULT GetSystemFontCollection(
734 BOOL include_downloadable,
735 IDWriteFontCollection1 **collection,
736 BOOL check_for_updates);
738 HRESULT GetFontDownloadQueue(IDWriteFontDownloadQueue **queue);
741 typedef struct DWRITE_GLYPH_IMAGE_DATA
743 void const *imageData;
744 UINT32 imageDataSize;
745 UINT32 uniqueDataId;
746 UINT32 pixelsPerEm;
747 D2D1_SIZE_U pixelSize;
748 D2D1_POINT_2L horizontalLeftOrigin;
749 D2D1_POINT_2L horizontalRightOrigin;
750 D2D1_POINT_2L verticalTopOrigin;
751 D2D1_POINT_2L verticalBottomOrigin;
752 } DWRITE_GLYPH_IMAGE_DATA;
755 local,
756 object,
757 uuid(27f2a904-4eb8-441d-9678-0563f53e3e2f)
759 interface IDWriteFontFace4 : IDWriteFontFace3
761 HRESULT GetGlyphImageFormats_(
762 UINT16 glyph,
763 UINT32 ppem_first,
764 UINT32 ppem_last,
765 DWRITE_GLYPH_IMAGE_FORMATS *formats);
766 DWRITE_GLYPH_IMAGE_FORMATS GetGlyphImageFormats();
767 HRESULT GetGlyphImageData(
768 UINT16 glyph,
769 UINT32 ppem,
770 DWRITE_GLYPH_IMAGE_FORMATS format,
771 DWRITE_GLYPH_IMAGE_DATA *data,
772 void **context);
773 void ReleaseGlyphImageData(void *context);
777 local,
778 object,
779 uuid(98eff3a5-b667-479a-b145-e2fa5b9fdc29)
781 interface IDWriteFontFace5 : IDWriteFontFace4
783 UINT32 GetFontAxisValueCount();
784 HRESULT GetFontAxisValues(
785 DWRITE_FONT_AXIS_VALUE *values,
786 UINT32 value_count);
787 BOOL HasVariations();
788 HRESULT GetFontResource(IDWriteFontResource **resource);
789 BOOL Equals(IDWriteFontFace *fontface);
792 typedef struct DWRITE_COLOR_GLYPH_RUN1
794 DWRITE_GLYPH_RUN glyphRun;
795 DWRITE_GLYPH_RUN_DESCRIPTION *glyphRunDescription;
796 FLOAT baselineOriginX;
797 FLOAT baselineOriginY;
798 DWRITE_COLOR_F runColor;
799 UINT16 paletteIndex;
800 DWRITE_GLYPH_IMAGE_FORMATS glyphImageFormat;
801 DWRITE_MEASURING_MODE measuringMode;
802 } DWRITE_COLOR_GLYPH_RUN1;
805 local,
806 object,
807 uuid(7c5f86da-c7a1-4f05-b8e1-55a179fe5a35)
809 interface IDWriteColorGlyphRunEnumerator1 : IDWriteColorGlyphRunEnumerator
811 HRESULT GetCurrentRun(
812 DWRITE_COLOR_GLYPH_RUN1 const **run);
816 local,
817 object,
818 uuid(4b0b5bd3-0797-4549-8ac5-fe915cc53856)
820 interface IDWriteFactory4 : IDWriteFactory3
822 HRESULT TranslateColorGlyphRun(
823 D2D1_POINT_2F baseline_origin,
824 DWRITE_GLYPH_RUN const *run,
825 DWRITE_GLYPH_RUN_DESCRIPTION const *run_desc,
826 DWRITE_GLYPH_IMAGE_FORMATS desired_formats,
827 DWRITE_MEASURING_MODE measuring_mode,
828 DWRITE_MATRIX const *transform,
829 UINT32 palette,
830 IDWriteColorGlyphRunEnumerator1 **layers);
832 HRESULT ComputeGlyphOrigins_(
833 DWRITE_GLYPH_RUN const *run,
834 D2D1_POINT_2F baseline_origin,
835 D2D1_POINT_2F *origins);
837 HRESULT ComputeGlyphOrigins(
838 DWRITE_GLYPH_RUN const *run,
839 DWRITE_MEASURING_MODE measuring_mode,
840 D2D1_POINT_2F baseline_origin,
841 DWRITE_MATRIX const *transform,
842 D2D1_POINT_2F *origins);
846 local,
847 object,
848 uuid(ce25f8fd-863b-4d13-9651-c1f88dc73fe2)
850 interface IDWriteAsyncResult : IUnknown
852 HANDLE GetWaitHandle();
853 HRESULT GetResult();
856 typedef struct DWRITE_FILE_FRAGMENT
858 UINT64 fileOffset;
859 UINT64 fragmentSize;
860 } DWRITE_FILE_FRAGMENT;
863 local,
864 object,
865 uuid(4db3757a-2c72-4ed9-b2b6-1ababe1aff9c)
867 interface IDWriteRemoteFontFileStream : IDWriteFontFileStream
869 HRESULT GetLocalFileSize(UINT64 *size);
870 HRESULT GetFileFragmentLocality(UINT64 offset, UINT64 size, BOOL *is_local, UINT64 *partial_size);
871 DWRITE_LOCALITY GetLocality();
872 HRESULT BeginDownload(
873 GUID const *operation_id,
874 DWRITE_FILE_FRAGMENT const *fragments,
875 UINT32 fragment_count,
876 IDWriteAsyncResult **async_result);
879 typedef enum DWRITE_CONTAINER_TYPE
881 DWRITE_CONTAINER_TYPE_UNKNOWN,
882 DWRITE_CONTAINER_TYPE_WOFF,
883 DWRITE_CONTAINER_TYPE_WOFF2,
884 } DWRITE_CONTAINER_TYPE;
887 local,
888 object,
889 uuid(68648c83-6ede-46c0-ab46-20083a887fde)
891 interface IDWriteRemoteFontFileLoader : IDWriteFontFileLoader
893 HRESULT CreateRemoteStreamFromKey(void const *key, UINT32 key_size, IDWriteRemoteFontFileStream **stream);
894 HRESULT GetLocalityFromKey(void const *key, UINT32 key_size, DWRITE_LOCALITY *locality);
895 HRESULT CreateFontFileReferenceFromUrl(
896 IDWriteFactory *factory,
897 WCHAR const *base_url,
898 WCHAR const *file_url,
899 IDWriteFontFile **fontfile);
903 local,
904 object,
905 uuid(dc102f47-a12d-4b1c-822d-9e117e33043f)
907 interface IDWriteInMemoryFontFileLoader : IDWriteFontFileLoader
909 HRESULT CreateInMemoryFontFileReference(
910 IDWriteFactory *factory,
911 void const *data,
912 UINT32 data_size,
913 IUnknown *owner,
914 IDWriteFontFile **fontfile);
915 UINT32 GetFileCount();
919 local,
920 object,
921 uuid(958db99a-be2a-4f09-af7d-65189803d1d3)
923 interface IDWriteFactory5 : IDWriteFactory4
925 HRESULT CreateFontSetBuilder(IDWriteFontSetBuilder1 **fontset_builder);
926 HRESULT CreateInMemoryFontFileLoader(IDWriteFontFileLoader **loader);
927 HRESULT CreateHttpFontFileLoader(
928 WCHAR const *referrer_url,
929 WCHAR const *extra_headers,
930 IDWriteRemoteFontFileLoader **loader);
931 DWRITE_CONTAINER_TYPE AnalyzeContainerType(void const *data, UINT32 data_size);
932 HRESULT UnpackFontFile(
933 DWRITE_CONTAINER_TYPE container_type,
934 void const *data,
935 UINT32 data_size,
936 IDWriteFontFileStream **stream);
940 local,
941 object,
942 uuid(f3744d80-21f7-42eb-b35d-995bc72fc223)
944 interface IDWriteFactory6 : IDWriteFactory5
946 HRESULT CreateFontFaceReference(
947 IDWriteFontFile *file,
948 UINT32 face_index,
949 DWRITE_FONT_SIMULATIONS simulations,
950 DWRITE_FONT_AXIS_VALUE const *axis_values,
951 UINT32 num_axis,
952 IDWriteFontFaceReference1 **face_ref);
953 HRESULT CreateFontResource(
954 IDWriteFontFile *file,
955 UINT32 face_index,
956 IDWriteFontResource **resource);
957 HRESULT GetSystemFontSet(
958 BOOL include_downloadable,
959 IDWriteFontSet1 **fontset);
960 HRESULT GetSystemFontCollection(
961 BOOL include_downloadable,
962 DWRITE_FONT_FAMILY_MODEL family_model,
963 IDWriteFontCollection2 **collection);
964 HRESULT CreateFontCollectionFromFontSet(
965 IDWriteFontSet *fontset,
966 DWRITE_FONT_FAMILY_MODEL family_model,
967 IDWriteFontCollection2 **collection);
968 HRESULT CreateFontSetBuilder(
969 IDWriteFontSetBuilder2 **builder);
970 HRESULT CreateTextFormat(
971 const WCHAR *familyname,
972 IDWriteFontCollection *collection,
973 DWRITE_FONT_AXIS_VALUE const *axis_values,
974 UINT32 num_axis,
975 FLOAT fontsize,
976 const WCHAR *localename,
977 IDWriteTextFormat3 **format);
981 local,
982 object,
983 uuid(35d0e0b3-9076-4d2e-a016-a91b568a06b4)
985 interface IDWriteFactory7 : IDWriteFactory6
987 HRESULT GetSystemFontSet(
988 BOOL include_downloadable,
989 IDWriteFontSet2 **fontset);
990 HRESULT GetSystemFontCollection(
991 BOOL include_downloadable,
992 DWRITE_FONT_FAMILY_MODEL family_model,
993 IDWriteFontCollection3 **collection);