dinput: Avoid deadlock when CS are acquired in different order.
[wine.git] / include / dwrite_3.idl
blob5958e6fb1bca61fcf00b92e1f6a6e88dd2b04a79
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_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;
90 FLOAT value;
91 } DWRITE_FONT_AXIS_VALUE;
93 typedef struct DWRITE_FONT_AXIS_RANGE
95 DWRITE_FONT_AXIS_TAG axisTag;
96 FLOAT minValue;
97 FLOAT maxValue;
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;
120 local,
121 object,
122 uuid(b06fe5b9-43ec-4393-881b-dbe4dc72fda7)
124 interface IDWriteFontDownloadListener : IUnknown
126 void DownloadCompleted(IDWriteFontDownloadQueue *queue, IUnknown *context, HRESULT result);
130 local,
131 object,
132 uuid(b71e6052-5aea-4fa3-832e-f60d431f7e91)
134 interface IDWriteFontDownloadQueue : IUnknown
136 HRESULT AddListener(IDWriteFontDownloadListener *listener, UINT32 *token);
137 HRESULT RemoveListener(UINT32 token);
138 BOOL IsEmpty();
139 HRESULT BeginDownload(IUnknown *context);
140 HRESULT CancelDownload();
141 UINT64 GetGenerationCount();
145 local,
146 object,
147 uuid(b7924baa-391b-412a-8c5c-e44cc2d867dc)
149 interface IDWriteRenderingParams3 : IDWriteRenderingParams2
151 DWRITE_RENDERING_MODE1 GetRenderingMode1();
155 local,
156 object,
157 uuid(cfee3140-1257-47ca-8b85-31bfcf3f2d0e)
159 interface IDWriteStringList : IUnknown
161 UINT32 GetCount();
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);
169 local,
170 object,
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);
192 local,
193 object,
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,
203 UINT32 num_values);
204 HRESULT GetFontAxisRanges(
205 DWRITE_FONT_AXIS_RANGE const *ranges,
206 UINT32 num_ranges);
207 DWRITE_FONT_AXIS_ATTRIBUTES GetFontAxisAttributes(
208 UINT32 axis);
209 HRESULT GetAxisNames(
210 UINT32 axis,
211 IDWriteLocalizedStrings **names);
212 UINT32 GetAxisValueNameCount(
213 UINT32 axis);
214 HRESULT GetAxisValueNames(
215 UINT32 axis,
216 UINT32 axis_value,
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,
223 UINT32 num_values,
224 IDWriteFontFace5 **fontface);
225 HRESULT CreateFontFaceReference(
226 DWRITE_FONT_SIMULATIONS simulations,
227 DWRITE_FONT_AXIS_VALUE const *axis_values,
228 UINT32 num_values,
229 IDWriteFontFaceReference1 **reference);
233 local,
234 object,
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,
242 UINT32 num_values,
243 IDWriteFontSet1 **fontset);
244 HRESULT GetFirstFontResources(IDWriteFontSet1 **fontset);
245 HRESULT GetFilteredFonts__(
246 UINT32 const *indices,
247 UINT32 num_indices,
248 IDWriteFontSet1 **fontset);
249 HRESULT GetFilteredFonts_(
250 DWRITE_FONT_AXIS_RANGE const *axis_ranges,
251 UINT32 num_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,
261 UINT32 num_ranges,
262 BOOL select_any_range,
263 UINT32 *indices,
264 UINT32 num_indices,
265 UINT32 *actual_num_indices);
266 HRESULT GetFilteredFontIndices(
267 DWRITE_FONT_PROPERTY const *props,
268 UINT32 num_properties,
269 BOOL select_any_range,
270 UINT32 *indices,
271 UINT32 num_indices,
272 UINT32 *actual_num_indices);
273 HRESULT GetFontAxisRanges_(
274 UINT32 font_index,
275 DWRITE_FONT_AXIS_RANGE *axis_ranges,
276 UINT32 num_ranges,
277 UINT32 *actual_num_ranges);
278 HRESULT GetFontAxisRanges(
279 DWRITE_FONT_AXIS_RANGE *axis_ranges,
280 UINT32 num_ranges,
281 UINT32 *actual_num_ranges);
282 HRESULT GetFontFaceReference(
283 UINT32 index,
284 IDWriteFontFaceReference1 **reference);
285 HRESULT CreateFontResource(
286 UINT32 index,
287 IDWriteFontResource **resource);
288 HRESULT CreateFontFace(
289 UINT32 index,
290 IDWriteFontFace5 **fontface);
291 DWRITE_LOCALITY GetFontLocality(UINT32 index);
295 local,
296 object,
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();
309 local,
310 object,
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);
321 local,
322 object,
323 uuid(3ed49e77-a398-4261-b9cf-c126c2131ef3)
325 interface IDWriteFontFamily2 : IDWriteFontFamily1
327 HRESULT GetMatchingFonts(
328 DWRITE_FONT_AXIS_VALUE const *axis_values,
329 UINT32 num_values,
330 IDWriteFontList2 **fontlist);
331 HRESULT GetFontSet(IDWriteFontSet1 **fontset);
335 local,
336 object,
337 uuid(53585141-d9f8-4095-8321-d73cf6bd116c)
339 interface IDWriteFontCollection1 : IDWriteFontCollection
341 HRESULT GetFontSet(IDWriteFontSet **fontset);
342 HRESULT GetFontFamily(UINT32 index, IDWriteFontFamily1 **family);
346 local,
347 object,
348 uuid(514039c6-4617-4064-bf8b-92ea83e506e0)
350 interface IDWriteFontCollection2 : IDWriteFontCollection1
352 HRESULT GetFontFamily(
353 UINT32 index,
354 IDWriteFontFamily2 **family);
355 HRESULT GetMatchingFonts(
356 const WCHAR *familyname,
357 DWRITE_FONT_AXIS_VALUE const *axis_values,
358 UINT32 num_values,
359 IDWriteFontList2 **fontlist);
360 DWRITE_FONT_FAMILY_MODEL GetFontFamilyModel();
361 HRESULT GetFontSet(IDWriteFontSet1 **fontset);
365 local,
366 object,
367 uuid(a4d055a6-f9e3-4e25-93b7-9e309f3af8e9)
369 interface IDWriteFontCollection3 : IDWriteFontCollection2
371 HANDLE GetExiprationEvent();
375 local,
376 object,
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);
399 local,
400 object,
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,
409 UINT32 num_values);
413 local,
414 object,
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);
425 local,
426 object,
427 uuid(c0763a34-77af-445a-b735-08c37b0a5bf5)
429 interface IDWriteFontList2 : IDWriteFontList1
431 HRESULT GetFontSet(IDWriteFontSet1 **fontset);
435 local,
436 object,
437 uuid(dc7ead19-e54c-43af-b2da-4e2b79ba3f7f)
439 interface IDWriteFontSet2 : IDWriteFontSet1
441 HANDLE GetExpirationEvent();
445 local,
446 object,
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,
460 BOOL *exists);
461 BOOL HasCharacter(UINT32 character);
462 HRESULT GetRecommendedRenderingMode(
463 FLOAT emsize,
464 FLOAT dpi_x,
465 FLOAT dpi_y,
466 DWRITE_MATRIX const *transform,
467 BOOL is_sideways,
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
484 UINT32 length;
485 UINT32 trailingWhitespaceLength;
486 UINT32 newlineLength;
487 FLOAT height;
488 FLOAT baseline;
489 BOOL isTrimmed;
490 FLOAT leadingBefore;
491 FLOAT leadingAfter;
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;
504 FLOAT height;
505 FLOAT baseline;
506 FLOAT leadingBefore;
507 DWRITE_FONT_LINE_GAP_USAGE fontLineGapUsage;
508 } DWRITE_LINE_SPACING;
511 local,
512 object,
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);
522 local,
523 object,
524 uuid(6d3b5641-e550-430d-a85b-b7bf48a93427)
526 interface IDWriteTextFormat3 : IDWriteTextFormat2
528 HRESULT SetFontAxisValues(
529 DWRITE_FONT_AXIS_VALUE const *axis_values,
530 UINT32 num_values);
531 UINT32 GetFontAxisValueCount();
532 HRESULT GetFontAxisValues(
533 DWRITE_FONT_AXIS_VALUE const *axis_values,
534 UINT32 num_values);
535 DWRITE_AUTOMATIC_FONT_AXES GetAutomaticFontAxes();
536 HRESULT SetAutomaticFontAxes(DWRITE_AUTOMATIC_FONT_AXES axes);
540 local,
541 object,
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);
553 local,
554 object,
555 uuid(05a9bf42-223f-4441-b5fb-8263685f55e9)
557 interface IDWriteTextLayout4 : IDWriteTextLayout3
559 HRESULT SetFontAxisValues(
560 DWRITE_FONT_AXIS_VALUE const *axis_values,
561 UINT32 num_values,
562 DWRITE_TEXT_RANGE range);
563 UINT32 GetFontAxisValueCount(UINT32 pos);
564 HRESULT GetFontAxisValues(
565 UINT32 pos,
566 DWRITE_FONT_AXIS_VALUE *values,
567 UINT32 num_values,
568 DWRITE_TEXT_RANGE *range);
569 DWRITE_AUTOMATIC_FONT_AXES GetAutomaticFontAxes();
570 HRESULT SetAutomaticFontAxes(DWRITE_AUTOMATIC_FONT_AXES axes);
574 local,
575 object,
576 uuid(2397599d-dd0d-4681-bd6a-f4f31eaade77)
578 interface IDWriteFontFallback1 : IDWriteFontFallback
580 HRESULT MapCharacters(
581 IDWriteTextAnalysisSource *source,
582 UINT32 pos,
583 UINT32 length,
584 IDWriteFontCollection *base_collection,
585 const WCHAR *familyname,
586 DWRITE_FONT_AXIS_VALUE const *axis_values,
587 UINT32 num_values,
588 UINT32 *mapped_length,
589 FLOAT *scale,
590 IDWriteFontFace5 **fontface);
594 local,
595 object,
596 uuid(4556be70-3abd-4f70-90be-421780a6f515)
598 interface IDWriteGdiInterop1 : IDWriteGdiInterop
600 HRESULT CreateFontFromLOGFONT(LOGFONTW const *logfont,
601 IDWriteFontCollection *collection,
602 IDWriteFont **font);
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);
614 local,
615 object,
616 uuid(2f642afe-9c68-4f40-b8be-457401afcb3d)
618 interface IDWriteFontSetBuilder : IUnknown
620 HRESULT AddFontFaceReference_(IDWriteFontFaceReference *ref,
621 DWRITE_FONT_PROPERTY const *props,
622 UINT32 prop_count);
623 HRESULT AddFontFaceReference(IDWriteFontFaceReference *ref);
624 HRESULT AddFontSet(IDWriteFontSet *fontset);
625 HRESULT CreateFontSet(IDWriteFontSet **fontset);
629 local,
630 object,
631 uuid(3ff7715f-3cdc-4dc6-9b72-ec5621dccafd)
633 interface IDWriteFontSetBuilder1 : IDWriteFontSetBuilder
635 HRESULT AddFontFile(IDWriteFontFile *file);
639 local,
640 object,
641 uuid(ee5ba612-b131-463c-8f4f-3189b9401e45)
643 interface IDWriteFontSetBuilder2 : IDWriteFontSetBuilder1
645 HRESULT AddFont(
646 IDWriteFontFile *fontfile,
647 UINT32 face_index,
648 DWRITE_FONT_SIMULATIONS simulations,
649 DWRITE_FONT_AXIS_VALUE const *axis_values,
650 UINT32 num_values,
651 DWRITE_FONT_AXIS_RANGE const *axis_ranges,
652 UINT32 num_ranges,
653 DWRITE_FONT_PROPERTY const *props,
654 UINT32 num_properties);
655 HRESULT AddFontFile(const WCHAR *filepath);
659 local,
660 object,
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,
672 FLOAT origin_x,
673 FLOAT origin_y,
674 IDWriteGlyphRunAnalysis **analysis);
676 HRESULT CreateCustomRenderingParams(
677 FLOAT gamma,
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,
690 UINT32 index,
691 DWRITE_FONT_SIMULATIONS simulations,
692 IDWriteFontFaceReference **reference);
694 HRESULT CreateFontFaceReference(
695 WCHAR const *path,
696 FILETIME const *writetime,
697 UINT32 index,
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;
732 UINT32 uniqueDataId;
733 UINT32 pixelsPerEm;
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;
742 local,
743 object,
744 uuid(27f2a904-4eb8-441d-9678-0563f53e3e2f)
746 interface IDWriteFontFace4 : IDWriteFontFace3
748 HRESULT GetGlyphImageFormats_(
749 UINT16 glyph,
750 UINT32 ppem_first,
751 UINT32 ppem_last,
752 DWRITE_GLYPH_IMAGE_FORMATS *formats);
753 DWRITE_GLYPH_IMAGE_FORMATS GetGlyphImageFormats();
754 HRESULT GetGlyphImageData(
755 UINT16 glyph,
756 UINT32 ppem,
757 DWRITE_GLYPH_IMAGE_FORMATS format,
758 DWRITE_GLYPH_IMAGE_DATA *data,
759 void **context);
760 void ReleaseGlyphImageData(void *context);
764 local,
765 object,
766 uuid(98eff3a5-b667-479a-b145-e2fa5b9fdc29)
768 interface IDWriteFontFace5 : IDWriteFontFace4
770 UINT32 GetFontAxisValueCount();
771 HRESULT GetFontAxisValues(
772 DWRITE_FONT_AXIS_VALUE *values,
773 UINT32 value_count);
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;
786 UINT16 paletteIndex;
787 DWRITE_GLYPH_IMAGE_FORMATS glyphImageFormat;
788 DWRITE_MEASURING_MODE measuringMode;
789 } DWRITE_COLOR_GLYPH_RUN1;
792 local,
793 object,
794 uuid(7c5f86da-c7a1-4f05-b8e1-55a179fe5a35)
796 interface IDWriteColorGlyphRunEnumerator1 : IDWriteColorGlyphRunEnumerator
798 HRESULT GetCurrentRun(
799 DWRITE_COLOR_GLYPH_RUN1 const **run);
803 local,
804 object,
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,
816 UINT32 palette,
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);
833 local,
834 object,
835 uuid(ce25f8fd-863b-4d13-9651-c1f88dc73fe2)
837 interface IDWriteAsyncResult : IUnknown
839 HANDLE GetWaitHandle();
840 HRESULT GetResult();
843 typedef struct DWRITE_FILE_FRAGMENT
845 UINT64 fileOffset;
846 UINT64 fragmentSize;
847 } DWRITE_FILE_FRAGMENT;
850 local,
851 object,
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;
874 local,
875 object,
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);
890 local,
891 object,
892 uuid(dc102f47-a12d-4b1c-822d-9e117e33043f)
894 interface IDWriteInMemoryFontFileLoader : IDWriteFontFileLoader
896 HRESULT CreateInMemoryFontFileReference(
897 IDWriteFactory *factory,
898 void const *data,
899 UINT32 data_size,
900 IUnknown *owner,
901 IDWriteFontFile **fontfile);
902 UINT32 GetFileCount();
906 local,
907 object,
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,
921 void const *data,
922 UINT32 data_size,
923 IDWriteFontFileStream **stream);
927 local,
928 object,
929 uuid(f3744d80-21f7-42eb-b35d-995bc72fc223)
931 interface IDWriteFactory6 : IDWriteFactory5
933 HRESULT CreateFontFaceReference(
934 IDWriteFontFile *file,
935 UINT32 face_index,
936 DWRITE_FONT_SIMULATIONS simulations,
937 DWRITE_FONT_AXIS_VALUE const *axis_values,
938 UINT32 num_axis,
939 IDWriteFontFaceReference1 **face_ref);
940 HRESULT CreateFontResource(
941 IDWriteFontFile *file,
942 UINT32 face_index,
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,
961 UINT32 num_axis,
962 FLOAT fontsize,
963 const WCHAR *localename,
964 IDWriteTextFormat3 **format);
968 local,
969 object,
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);