1 /**
2  * This file has no copyright assigned and is placed in the Public Domain.
3  * This file is part of the mingw-w64 runtime package.
4  * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5  */
6 
7 #ifndef DWRITE_1_H_INCLUDED
8 #define DWRITE_1_H_INCLUDED
9 
10 #include <dwrite.h>
11 
12 enum DWRITE_OUTLINE_THRESHOLD {
13     DWRITE_OUTLINE_THRESHOLD_ANTIALIASED,
14     DWRITE_OUTLINE_THRESHOLD_ALIASED
15 };
16 
17 enum DWRITE_BASELINE
18 {
19     DWRITE_BASELINE_DEFAULT,
20     DWRITE_BASELINE_ROMAN,
21     DWRITE_BASELINE_CENTRAL,
22     DWRITE_BASELINE_MATH,
23     DWRITE_BASELINE_HANGING,
24     DWRITE_BASELINE_IDEOGRAPHIC_BOTTOM,
25     DWRITE_BASELINE_IDEOGRAPHIC_TOP,
26     DWRITE_BASELINE_MINIMUM,
27     DWRITE_BASELINE_MAXIMUM,
28 };
29 
30 enum DWRITE_GLYPH_ORIENTATION_ANGLE
31 {
32     DWRITE_GLYPH_ORIENTATION_ANGLE_0_DEGREES,
33     DWRITE_GLYPH_ORIENTATION_ANGLE_90_DEGREES,
34     DWRITE_GLYPH_ORIENTATION_ANGLE_180_DEGREES,
35     DWRITE_GLYPH_ORIENTATION_ANGLE_270_DEGREES,
36 };
37 
38 enum DWRITE_TEXT_ANTIALIAS_MODE
39 {
40     DWRITE_TEXT_ANTIALIAS_MODE_CLEARTYPE,
41     DWRITE_TEXT_ANTIALIAS_MODE_GRAYSCALE
42 };
43 
44 struct DWRITE_CARET_METRICS {
45     INT16 slopeRise;
46     INT16 slopeRun;
47     INT16 offset;
48 };
49 
50 struct DWRITE_UNICODE_RANGE {
51     UINT32 first;
52     UINT32 last;
53 };
54 
55 struct DWRITE_FONT_METRICS1 : public DWRITE_FONT_METRICS {
56     INT16 glyphBoxLeft;
57     INT16 glyphBoxTop;
58     INT16 glyphBoxRight;
59     INT16 glyphBoxBottom;
60     INT16 subscriptPositionX;
61     INT16 subscriptPositionY;
62     INT16 subscriptSizeX;
63     INT16 subscriptSizeY;
64     INT16 superscriptPositionX;
65     INT16 superscriptPositionY;
66     INT16 superscriptSizeX;
67     INT16 superscriptSizeY;
68     BOOL hasTypographicMetrics;
69 };
70 
71 struct DWRITE_SCRIPT_PROPERTIES
72 {
73     UINT32 isoScriptCode;
74     UINT32 isoScriptNumber;
75     UINT32 clusterLookahead;
76     UINT32 justificationCharacter;
77     UINT32 restrictCaretToClusters      : 1;
78     UINT32 usesWordDividers             : 1;
79     UINT32 isDiscreteWriting            : 1;
80     UINT32 isBlockWriting               : 1;
81     UINT32 isDistributedWithinCluster   : 1;
82     UINT32 isConnectedWriting           : 1;
83     UINT32 isCursiveWriting             : 1;
84     UINT32 reserved                     : 25;
85 };
86 
87 struct DWRITE_JUSTIFICATION_OPPORTUNITY
88 {
89     FLOAT expansionMinimum;
90     FLOAT expansionMaximum;
91     FLOAT compressionMaximum;
92     UINT32 expansionPriority         : 8;
93     UINT32 compressionPriority       : 8;
94     UINT32 allowResidualExpansion    : 1;
95     UINT32 allowResidualCompression  : 1;
96     UINT32 applyToLeadingEdge        : 1;
97     UINT32 applyToTrailingEdge       : 1;
98     UINT32 reserved                  : 12;
99 };
100 
101 union DWRITE_PANOSE {
102     UINT8 values[10];
103     UINT8 familyKind;
104     struct {
105         UINT8 familyKind;
106         UINT8 serifStyle;
107         UINT8 weight;
108         UINT8 proportion;
109         UINT8 contrast;
110         UINT8 strokeVariation;
111         UINT8 armStyle;
112         UINT8 letterform;
113         UINT8 midline;
114         UINT8 xHeight;
115     } text;
116     struct {
117         UINT8 familyKind;
118         UINT8 toolKind;
119         UINT8 weight;
120         UINT8 spacing;
121         UINT8 aspectRatio;
122         UINT8 contrast;
123         UINT8 scriptTopology;
124         UINT8 scriptForm;
125         UINT8 finials;
126         UINT8 xAscent;
127     } script;
128     struct {
129         UINT8 familyKind;
130         UINT8 decorativeClass;
131         UINT8 weight;
132         UINT8 aspect;
133         UINT8 contrast;
134         UINT8 serifVariant;
135         UINT8 fill;
136         UINT8 lining;
137         UINT8 decorativeTopology;
138         UINT8 characterRange;
139     } decorative;
140     struct {
141         UINT8 familyKind;
142         UINT8 symbolKind;
143         UINT8 weight;
144         UINT8 spacing;
145         UINT8 aspectRatioAndContrast;
146         UINT8 aspectRatio94;
147         UINT8 aspectRatio119;
148         UINT8 aspectRatio157;
149         UINT8 aspectRatio163;
150         UINT8 aspectRatio211;
151     } symbol;
152 };
153 
154 #undef  INTERFACE
155 #define INTERFACE IDWriteFontCollection
DECLARE_INTERFACE_(IDWriteFontFace1,IDWriteFontFace)156 DECLARE_INTERFACE_(IDWriteFontFace1, IDWriteFontFace)
157 {
158     BEGIN_INTERFACE
159 
160 #ifndef __cplusplus
161     /* IUnknown methods */
162     STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE;
163     STDMETHOD_(ULONG, AddRef)(THIS) PURE;
164     STDMETHOD_(ULONG, Release)(THIS) PURE;
165 
166     /* IDWriteFontFace methods */
167     STDMETHOD_(DWRITE_FONT_FACE_TYPE, GetType)(THIS) PURE;
168 
169     STDMETHOD(GetFiles)(THIS_
170         UINT32 *numberOfFiles,
171         IDWriteFontFile **fontFiles) PURE;
172 
173     STDMETHOD_(UINT32, GetIndex)(THIS) PURE;
174     STDMETHOD_(DWRITE_FONT_SIMULATIONS, GetSimulations)(THIS) PURE;
175     STDMETHOD_(WINBOOL, IsSymbolFont)(THIS) PURE;
176 
177     STDMETHOD_(void, GetMetrics)(THIS_
178         DWRITE_FONT_METRICS *fontFaceMetrics) PURE;
179 
180     STDMETHOD_(UINT16, GetGlyphCount)(THIS) PURE;
181 
182     STDMETHOD(GetDesignGlyphMetrics)(THIS_
183         UINT16 const *glyphIndices,
184         UINT32 glyphCount,
185         DWRITE_GLYPH_METRICS *glyphMetrics,
186         WINBOOL isSideways __MINGW_DEF_ARG_VAL(FALSE)) PURE;
187 
188     STDMETHOD(GetGlyphIndices)(THIS_
189         UINT32 const *codePoints,
190         UINT32 codePointCount,
191         UINT16 *glyphIndices) PURE;
192 
193     STDMETHOD(TryGetFontTable)(THIS_
194         UINT32 openTypeTableTag,
195         const void **tableData,
196         UINT32 *tableSize,
197         void **tableContext,
198         WINBOOL *exists) PURE;
199 
200     STDMETHOD_(void, ReleaseFontTable)(THIS_
201         void *tableContext) PURE;
202 
203     STDMETHOD(GetGlyphRunOutline)(THIS_
204         FLOAT emSize,
205         UINT16 const *glyphIndices,
206         FLOAT const *glyphAdvances,
207         DWRITE_GLYPH_OFFSET const *glyphOffsets,
208         UINT32 glyphCount,
209         WINBOOL isSideways,
210         WINBOOL isRightToLeft,
211         IDWriteGeometrySink *geometrySink) PURE;
212 
213     STDMETHOD(GetRecommendedRenderingMode)(THIS_
214         FLOAT emSize,
215         FLOAT pixelsPerDip,
216         DWRITE_MEASURING_MODE measuringMode,
217         IDWriteRenderingParams *renderingParams,
218         DWRITE_RENDERING_MODE *renderingMode) PURE;
219 
220     STDMETHOD(GetGdiCompatibleMetrics)(THIS_
221         FLOAT emSize,
222         FLOAT pixelsPerDip,
223         DWRITE_MATRIX const *transform,
224         DWRITE_FONT_METRICS *fontFaceMetrics) PURE;
225 
226 
227     STDMETHOD(GetGdiCompatibleGlyphMetrics)(THIS_
228         FLOAT emSize,
229         FLOAT pixelsPerDip,
230         DWRITE_MATRIX const *transform,
231         WINBOOL useGdiNatural,
232         UINT16 const *glyphIndices,
233         UINT32 glyphCount,
234         DWRITE_GLYPH_METRICS *glyphMetrics,
235         WINBOOL isSideways __MINGW_DEF_ARG_VAL(FALSE)) PURE;
236 #endif
237 
238     /* IDWriteFontFace1 methods */
239     STDMETHOD_(void, GetMetrics)(THIS_ DWRITE_FONT_METRICS1*) PURE;
240     STDMETHOD(GetGdiCompatibleMetrics)(THIS_ FLOAT,FLOAT,DWRITE_MATRIX const*,DWRITE_FONT_METRICS1*) PURE;
241     STDMETHOD_(void, GetCaretMetrics)(THIS_ DWRITE_CARET_METRICS*) PURE;
242     STDMETHOD(GetUnicodeRanges)(THIS_ UINT32, DWRITE_UNICODE_RANGE*,UINT32*) PURE;
243     STDMETHOD_(BOOL, IsMonospacedFont)(THIS) PURE;
244     STDMETHOD(GetDesignGlyphAdvances)(THIS_ UINT32,UINT16 const*,INT32*,BOOL isSideways __MINGW_DEF_ARG_VAL(FALSE)) PURE;
245     STDMETHOD(GetGdiCompatibleGlyphAdvances)(THIS_ FLOAT,FLOAT,DWRITE_MATRIX const*,BOOL,BOOL,UINT32,
246             UINT16 const*,INT32*) PURE;
247     STDMETHOD(GetKerningPairAdjustments)(THIS_ UINT32,UINT16 const*,INT32*) PURE;
248     STDMETHOD_(BOOL, HasKerningPairs)(THIS);
249     STDMETHOD(GetRecommendedRenderingMode)(FLOAT,FLOAT,FLOAT,DWRITE_MATRIX const*,BOOL,
250             DWRITE_OUTLINE_THRESHOLD,DWRITE_MEASURING_MODE,DWRITE_RENDERING_MODE*) PURE;
251     STDMETHOD(GetVerticalGlyphVariants)(THIS_ UINT32,UINT16 const*,UINT16*);
252     STDMETHOD_(BOOL, HasVerticalGlyphVariants)(THIS);
253 };
254 
255 __CRT_UUID_DECL(IDWriteFontFace1, 0xa71efdb4,0x9fdb,0x4838,0xad,0x90,0xcf,0xc3,0xbe,0x8c,0x3d,0xaf);
256 
257 #undef  INTERFACE
258 #define INTERFACE IDWriteRenderingParams1
DECLARE_INTERFACE_(IDWriteRenderingParams1,IDWriteRenderingParams)259 DECLARE_INTERFACE_(IDWriteRenderingParams1,IDWriteRenderingParams)
260 {
261     BEGIN_INTERFACE
262 
263 #ifndef __cplusplus
264     /* IUnknown methods */
265     STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE;
266     STDMETHOD_(ULONG, AddRef)(THIS) PURE;
267     STDMETHOD_(ULONG, Release)(THIS) PURE;
268 
269     /* IDWriteRenderingParams methods */
270     STDMETHOD_(FLOAT, GetGamma)(THIS) PURE;
271     STDMETHOD_(FLOAT, GetEnhancedContrast)(THIS) PURE;
272     STDMETHOD_(FLOAT, GetClearTypeLevel)(THIS) PURE;
273     STDMETHOD_(DWRITE_PIXEL_GEOMETRY, GetPixelGeometry)(THIS) PURE;
274     STDMETHOD_(DWRITE_RENDERING_MODE, GetRenderingMode)(THIS) PURE;
275 #endif
276 
277     /* IDWriteRenderingParams1 methods */
278     STDMETHOD_(FLOAT, GetGrayscaleEnhancedContrast)(THIS) PURE;
279 
280     END_INTERFACE
281 };
282 
283 __CRT_UUID_DECL(IDWriteRenderingParams1, 0x94413cf4,0xa6fc,0x4248,0x8b,0x50,0x66,0x74,0x34,0x8f,0xca,0xd3)
284 
285 interface IDWriteTextAnalysisSource1;
286 interface IDWriteTextAnalysisSink1;
287 interface IDWriteRenderingParams1;
288 
289 #undef  INTERFACE
290 #define INTERFACE IDWriteTextAnalyzer1
DECLARE_INTERFACE_(IDWriteTextAnalyzer1,IDWriteTextAnalyzer)291 DECLARE_INTERFACE_(IDWriteTextAnalyzer1,IDWriteTextAnalyzer)
292 {
293     BEGIN_INTERFACE
294 
295 #ifndef __cplusplus
296     /* IUnknown methods */
297     STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE;
298     STDMETHOD_(ULONG, AddRef)(THIS) PURE;
299     STDMETHOD_(ULONG, Release)(THIS) PURE;
300 
301     /* IDWriteTextAnalyzer methods */
302     STDMETHOD(AnalyzeScript)(THIS_
303         IDWriteTextAnalysisSource* analysisSource,
304         UINT32 textPosition,
305         UINT32 textLength,
306         IDWriteTextAnalysisSink *analysisSink) PURE;
307 
308     STDMETHOD(AnalyzeBidi)(THIS_
309         IDWriteTextAnalysisSource *analysisSource,
310         UINT32 textPosition,
311         UINT32 textLength,
312         IDWriteTextAnalysisSink *analysisSink) PURE;
313 
314     STDMETHOD(AnalyzeNumberSubstitution)(THIS_
315         IDWriteTextAnalysisSource *analysisSource,
316         UINT32 textPosition,
317         UINT32 textLength,
318         IDWriteTextAnalysisSink *analysisSink) PURE;
319 
320     STDMETHOD(AnalyzeLineBreakpoints)(THIS_
321         IDWriteTextAnalysisSource *analysisSource,
322         UINT32 textPosition,
323         UINT32 textLength,
324         IDWriteTextAnalysisSink *analysisSink) PURE;
325 
326     STDMETHOD(GetGlyphs)(THIS_
327         WCHAR const *textString,
328         UINT32 textLength,
329         IDWriteFontFace *fontFace,
330         WINBOOL isSideways,
331         WINBOOL isRightToLeft,
332         DWRITE_SCRIPT_ANALYSIS const *scriptAnalysis,
333         WCHAR const *localeName,
334         IDWriteNumberSubstitution *numberSubstitution,
335         DWRITE_TYPOGRAPHIC_FEATURES const **features,
336         UINT32 const *featureRangeLengths,
337         UINT32 featureRanges,
338         UINT32 maxGlyphCount,
339         UINT16 *clusterMap,
340         DWRITE_SHAPING_TEXT_PROPERTIES *textProps,
341         UINT16 *glyphIndices,
342         DWRITE_SHAPING_GLYPH_PROPERTIES *glyphProps,
343         UINT32 *actualGlyphCount) PURE;
344 
345     STDMETHOD(GetGlyphPlacements)(THIS_
346         WCHAR const *textString,
347         UINT16 const *clusterMap,
348         DWRITE_SHAPING_TEXT_PROPERTIES *textProps,
349         UINT32 textLength,
350         UINT16 const *glyphIndices,
351         DWRITE_SHAPING_GLYPH_PROPERTIES const *glyphProps,
352         UINT32 glyphCount,
353         IDWriteFontFace *fontFace,
354         FLOAT fontEmSize,
355         WINBOOL isSideways,
356         WINBOOL isRightToLeft,
357         DWRITE_SCRIPT_ANALYSIS const *scriptAnalysis,
358         WCHAR const *localeName,
359         DWRITE_TYPOGRAPHIC_FEATURES const **features,
360         UINT32 const *featureRangeLengths,
361         UINT32 featureRanges,
362         FLOAT *glyphAdvances,
363         DWRITE_GLYPH_OFFSET *glyphOffsets) PURE;
364 
365     STDMETHOD(GetGdiCompatibleGlyphPlacements)(THIS_
366         WCHAR const *textString,
367         UINT16 const *clusterMap,
368         DWRITE_SHAPING_TEXT_PROPERTIES *textProps,
369         UINT32 textLength,
370         UINT16 const *glyphIndices,
371         DWRITE_SHAPING_GLYPH_PROPERTIES const *glyphProps,
372         UINT32 glyphCount,
373         IDWriteFontFace *fontFace,
374         FLOAT fontEmSize,
375         FLOAT pixelsPerDip,
376         DWRITE_MATRIX const *transform,
377         WINBOOL useGdiNatural,
378         WINBOOL isSideways,
379         WINBOOL isRightToLeft,
380         DWRITE_SCRIPT_ANALYSIS const* scriptAnalysis,
381         WCHAR const *localeName,
382         DWRITE_TYPOGRAPHIC_FEATURES const **features,
383         UINT32 const *featureRangeLengths,
384         UINT32 featureRanges,
385         FLOAT *glyphAdvances,
386         DWRITE_GLYPH_OFFSET *glyphOffsets) PURE;
387 #endif
388 
389     /* IDWriteTextAnalyzer1 methods */
390     STDMETHOD(ApplyCharacterSpacing)(THIS_
391         FLOAT leadingSpacing,
392         FLOAT trailingSpacing,
393         FLOAT minimumAdvanceWidth,
394         UINT32 textLength,
395         UINT32 glyphCount,
396         UINT16 const* clusterMap,
397         FLOAT const* glyphAdvances,
398         DWRITE_GLYPH_OFFSET const* glyphOffsets,
399         DWRITE_SHAPING_GLYPH_PROPERTIES const* glyphProperties,
400         FLOAT* modifiedGlyphAdvances,
401         DWRITE_GLYPH_OFFSET* modifiedGlyphOffsets) PURE;
402 
403     STDMETHOD(GetBaseline)(THIS_
404         IDWriteFontFace* fontFace,
405         DWRITE_BASELINE baseline,
406         BOOL isVertical,
407         BOOL isSimulationAllowed,
408         DWRITE_SCRIPT_ANALYSIS scriptAnalysis,
409         WCHAR const* localeName,
410         INT32* baselineCoordinate,
411         BOOL* exists
412         ) PURE;
413 
414     STDMETHOD(AnalyzeVerticalGlyphOrientation)(
415         IDWriteTextAnalysisSource1* analysisSource,
416         UINT32 textPosition,
417         UINT32 textLength,
418         IDWriteTextAnalysisSink1* analysisSink
419         ) PURE;
420 
421     STDMETHOD(GetGlyphOrientationTransform)(
422         DWRITE_GLYPH_ORIENTATION_ANGLE glyphOrientationAngle,
423         BOOL isSideways,
424         DWRITE_MATRIX* transform
425         ) PURE;
426 
427     STDMETHOD(GetScriptProperties)(
428         DWRITE_SCRIPT_ANALYSIS scriptAnalysis,
429         DWRITE_SCRIPT_PROPERTIES* scriptProperties
430         ) PURE;
431 
432     STDMETHOD(GetTextComplexity)(
433         WCHAR const* textString,
434         UINT32 textLength,
435         IDWriteFontFace* fontFace,
436         BOOL* isTextSimple,
437         UINT32* textLengthRead,
438         UINT16* glyphIndices
439         ) PURE;
440 
441     STDMETHOD(GetJustificationOpportunities)(
442         IDWriteFontFace* fontFace,
443         FLOAT fontEmSize,
444         DWRITE_SCRIPT_ANALYSIS scriptAnalysis,
445         UINT32 textLength,
446         UINT32 glyphCount,
447         WCHAR const* textString,
448         UINT16 const* clusterMap,
449         DWRITE_SHAPING_GLYPH_PROPERTIES const* glyphProperties,
450         DWRITE_JUSTIFICATION_OPPORTUNITY* justificationOpportunities
451         ) PURE;
452 
453     STDMETHOD(JustifyGlyphAdvances)(
454         FLOAT lineWidth,
455         UINT32 glyphCount,
456         DWRITE_JUSTIFICATION_OPPORTUNITY const* justificationOpportunities,
457         FLOAT const* glyphAdvances,
458         DWRITE_GLYPH_OFFSET const* glyphOffsets,
459         FLOAT* justifiedGlyphAdvances,
460         DWRITE_GLYPH_OFFSET* justifiedGlyphOffsets
461         ) PURE;
462 
463     STDMETHOD(GetJustifiedGlyphs)(
464         IDWriteFontFace* fontFace,
465         FLOAT fontEmSize,
466         DWRITE_SCRIPT_ANALYSIS scriptAnalysis,
467         UINT32 textLength,
468         UINT32 glyphCount,
469         UINT32 maxGlyphCount,
470         UINT16 const* clusterMap,
471         UINT16 const* glyphIndices,
472         FLOAT const* glyphAdvances,
473         FLOAT const* justifiedGlyphAdvances,
474         DWRITE_GLYPH_OFFSET const* justifiedGlyphOffsets,
475         DWRITE_SHAPING_GLYPH_PROPERTIES const* glyphProperties,
476         UINT32* actualGlyphCount,
477         UINT16* modifiedClusterMap,
478         UINT16* modifiedGlyphIndices,
479         FLOAT* modifiedGlyphAdvances,
480         DWRITE_GLYPH_OFFSET* modifiedGlyphOffsets
481         ) PURE;
482 
483     END_INTERFACE
484 };
485 
486 __CRT_UUID_DECL(IDWriteTextAnalyzer1, 0x80dad800,0xe21f,0x4e83,0x4e,0xce,0xbf,0xcc,0xe5,0x00,0xdb,0x7c);
487 
488 #undef  INTERFACE
489 #define INTERFACE IDWriteFactory1
DECLARE_INTERFACE_(IDWriteFactory1,IDWriteFactory)490 DECLARE_INTERFACE_(IDWriteFactory1,IDWriteFactory)
491 {
492     BEGIN_INTERFACE
493 
494 #ifndef __cplusplus
495     /* IUnknown methods */
496     STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE;
497     STDMETHOD_(ULONG, AddRef)(THIS) PURE;
498     STDMETHOD_(ULONG, Release)(THIS) PURE;
499 
500     /* IDWriteFactory methods */
501     STDMETHOD(GetSystemFontCollection)(THIS_
502         IDWriteFontCollection **fontCollection,
503         WINBOOL checkForUpdates __MINGW_DEF_ARG_VAL(FALSE)) PURE;
504 
505     STDMETHOD(CreateCustomFontCollection)(THIS_
506         IDWriteFontCollectionLoader *collectionLoader,
507         void const *collectionKey,
508         UINT32 collectionKeySize,
509         IDWriteFontCollection **fontCollection) PURE;
510 
511     STDMETHOD(RegisterFontCollectionLoader)(THIS_
512         IDWriteFontCollectionLoader *fontCollectionLoader) PURE;
513 
514     STDMETHOD(UnregisterFontCollectionLoader)(THIS_
515         IDWriteFontCollectionLoader *fontCollectionLoader) PURE;
516 
517     STDMETHOD(CreateFontFileReference)(THIS_
518         WCHAR const *filePath,
519         FILETIME const *lastWriteTime,
520         IDWriteFontFile **fontFile) PURE;
521 
522     STDMETHOD(CreateCustomFontFileReference)(THIS_
523         void const *fontFileReferenceKey,
524         UINT32 fontFileReferenceKeySize,
525         IDWriteFontFileLoader *fontFileLoader,
526         IDWriteFontFile **fontFile) PURE;
527 
528     STDMETHOD(CreateFontFace)(THIS_
529         DWRITE_FONT_FACE_TYPE fontFaceType,
530         UINT32 numberOfFiles,
531         IDWriteFontFile *const *fontFiles,
532         UINT32 faceIndex,
533         DWRITE_FONT_SIMULATIONS fontFaceSimulationFlags,
534         IDWriteFontFace **fontFace) PURE;
535 
536     STDMETHOD(CreateRenderingParams)(THIS_
537         IDWriteRenderingParams **renderingParams) PURE;
538 
539     STDMETHOD(CreateMonitorRenderingParams)(THIS_
540         HMONITOR monitor,
541         IDWriteRenderingParams **renderingParams) PURE;
542 
543     STDMETHOD(CreateCustomRenderingParams)(THIS_
544         FLOAT gamma,
545         FLOAT enhancedContrast,
546         FLOAT clearTypeLevel,
547         DWRITE_PIXEL_GEOMETRY pixelGeometry,
548         DWRITE_RENDERING_MODE renderingMode,
549         IDWriteRenderingParams **renderingParams) PURE;
550 
551     STDMETHOD(RegisterFontFileLoader)(THIS_
552         IDWriteFontFileLoader *fontFileLoader) PURE;
553 
554     STDMETHOD(UnregisterFontFileLoader)(THIS_
555         IDWriteFontFileLoader *fontFileLoader) PURE;
556 
557     STDMETHOD(CreateTextFormat)(THIS_
558         WCHAR const *fontFamilyName,
559         IDWriteFontCollection *fontCollection,
560         DWRITE_FONT_WEIGHT fontWeight,
561         DWRITE_FONT_STYLE fontStyle,
562         DWRITE_FONT_STRETCH fontStretch,
563         FLOAT fontSize,
564         WCHAR const *localeName,
565         IDWriteTextFormat **textFormat) PURE;
566 
567     STDMETHOD(CreateTypography)(THIS_
568         IDWriteTypography **typography) PURE;
569 
570     STDMETHOD(GetGdiInterop)(THIS_
571         IDWriteGdiInterop **gdiInterop) PURE;
572 
573     STDMETHOD(CreateTextLayout)(THIS_
574         WCHAR const *string,
575         UINT32 stringLength,
576         IDWriteTextFormat *textFormat,
577         FLOAT maxWidth,
578         FLOAT maxHeight,
579         IDWriteTextLayout **textLayout) PURE;
580 
581     STDMETHOD(CreateGdiCompatibleTextLayout)(THIS_
582         WCHAR const *string,
583         UINT32 stringLength,
584         IDWriteTextFormat *textFormat,
585         FLOAT layoutWidth,
586         FLOAT layoutHeight,
587         FLOAT pixelsPerDip,
588         DWRITE_MATRIX const *transform,
589         WINBOOL useGdiNatural,
590         IDWriteTextLayout **textLayout) PURE;
591 
592     STDMETHOD(CreateEllipsisTrimmingSign)(THIS_
593         IDWriteTextFormat *textFormat,
594         IDWriteInlineObject **trimmingSign) PURE;
595 
596     STDMETHOD(CreateTextAnalyzer)(THIS_
597         IDWriteTextAnalyzer **textAnalyzer) PURE;
598 
599     STDMETHOD(CreateNumberSubstitution)(THIS_
600         DWRITE_NUMBER_SUBSTITUTION_METHOD substitutionMethod,
601         WCHAR const *localeName,
602         WINBOOL ignoreUserOverride,
603         IDWriteNumberSubstitution **numberSubstitution) PURE;
604 
605     STDMETHOD(CreateGlyphRunAnalysis)(THIS_
606         DWRITE_GLYPH_RUN const *glyphRun,
607         FLOAT pixelsPerDip,
608         DWRITE_MATRIX const *transform,
609         DWRITE_RENDERING_MODE renderingMode,
610         DWRITE_MEASURING_MODE measuringMode,
611         FLOAT baselineOriginX,
612         FLOAT baselineOriginY,
613         IDWriteGlyphRunAnalysis **glyphRunAnalysis) PURE;
614 #endif
615 
616     /* IDWriteFactory1 methods */
617     STDMETHOD(GetEudcFontCollection)(THIS_
618         IDWriteFontCollection **fontCollection,
619         BOOL checkForUpdates __MINGW_DEF_ARG_VAL(FALSE)) PURE;
620 
621     STDMETHOD(CreateCustomRenderingParams)(THIS_
622         FLOAT gamma,
623         FLOAT enhancedContrast,
624         FLOAT enhancedContrastGrayscale,
625         FLOAT clearTypeLevel,
626         DWRITE_PIXEL_GEOMETRY pixelGeometry,
627         DWRITE_RENDERING_MODE renderingMode,
628         IDWriteRenderingParams1 **renderingParams) PURE;
629 
630 #ifdef __cplusplus
631     using IDWriteFactory::CreateCustomRenderingParams;
632 #endif
633 
634     END_INTERFACE
635 };
636 
637 __CRT_UUID_DECL(IDWriteFactory1, 0x30572f99,0xdac6,0x41db,0xa1,0x6e,0x04,0x86,0x30,0x7e,0x60,0x6a)
638 
639 #undef  INTERFACE
640 #define INTERFACE IDWriteBitmapRenderTarget1
DECLARE_INTERFACE_(IDWriteBitmapRenderTarget1,IDWriteBitmapRenderTarget)641 DECLARE_INTERFACE_(IDWriteBitmapRenderTarget1,IDWriteBitmapRenderTarget)
642 {
643     BEGIN_INTERFACE
644 
645 #ifndef __cplusplus
646     /* IUnknown methods */
647     STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE;
648     STDMETHOD_(ULONG, AddRef)(THIS) PURE;
649     STDMETHOD_(ULONG, Release)(THIS) PURE;
650 
651     /* IDWriteBitmapRenderTarget methods */
652     STDMETHOD(DrawGlyphRun)(THIS_
653         FLOAT baselineOriginX,
654         FLOAT baselineOriginY,
655         DWRITE_MEASURING_MODE measuringMode,
656         DWRITE_GLYPH_RUN const *glyphRun,
657         IDWriteRenderingParams *renderingParams,
658         COLORREF textColor,
659         RECT *blackBoxRect __MINGW_DEF_ARG_VAL(NULL)) PURE;
660 
661     STDMETHOD_(HDC, GetMemoryDC)(THIS) PURE;
662     STDMETHOD_(FLOAT, GetPixelsPerDip)(THIS) PURE;
663 
664     STDMETHOD(SetPixelsPerDip)(THIS_
665         FLOAT pixelsPerDip) PURE;
666 
667     STDMETHOD(GetCurrentTransform)(THIS_
668         DWRITE_MATRIX* transform) PURE;
669 
670     STDMETHOD(SetCurrentTransform)(THIS_
671         DWRITE_MATRIX const *transform) PURE;
672 
673     STDMETHOD(GetSize)(THIS_
674         SIZE *size) PURE;
675 
676     STDMETHOD(Resize)(THIS_
677         UINT32 width,
678         UINT32 height) PURE;
679 
680 #endif
681 
682     STDMETHOD_(DWRITE_TEXT_ANTIALIAS_MODE, GetTextAntialiasMode)(THIS) PURE;
683 
684     STDMETHOD(SetTextAntialiasMode)(THIS_
685         DWRITE_TEXT_ANTIALIAS_MODE antialiasMode) PURE;
686 
687     END_INTERFACE
688 };
689 
690 __CRT_UUID_DECL(IDWriteBitmapRenderTarget1, 0x791e8298,0x3ef3,0x4230,0x98,0x80,0xc9,0xbd,0xec,0xc4,0x20,0x64)
691 
692 #endif /* DWRITE_1_H_INCLUDED */
693