2 * Copyright 2014 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_1.idl";
21 typedef enum DWRITE_OPTICAL_ALIGNMENT
23 DWRITE_OPTICAL_ALIGNMENT_NONE
,
24 DWRITE_OPTICAL_ALIGNMENT_NO_SIDE_BEARINGS
25 } DWRITE_OPTICAL_ALIGNMENT
;
27 typedef enum DWRITE_GRID_FIT_MODE
29 DWRITE_GRID_FIT_MODE_DEFAULT
,
30 DWRITE_GRID_FIT_MODE_DISABLED
,
31 DWRITE_GRID_FIT_MODE_ENABLED
32 } DWRITE_GRID_FIT_MODE
;
34 typedef struct DWRITE_TEXT_METRICS1
36 /* DWRITE_TEXT_METRICS fields */
40 FLOAT widthIncludingTrailingWhitespace
;
44 UINT32 maxBidiReorderingDepth
;
46 /* DWRITE_TEXT_METRICS1 fields */
47 FLOAT heightIncludingTrailingWhitespace
;
48 } DWRITE_TEXT_METRICS1
;
50 cpp_quote
("#ifndef D3DCOLORVALUE_DEFINED")
51 typedef struct _D3DCOLORVALUE
70 cpp_quote
("#define D3DCOLORVALUE_DEFINED")
73 typedef D3DCOLORVALUE DWRITE_COLOR_F
;
75 typedef struct DWRITE_COLOR_GLYPH_RUN
77 DWRITE_GLYPH_RUN glyphRun
;
78 DWRITE_GLYPH_RUN_DESCRIPTION
* glyphRunDescription
;
79 FLOAT baselineOriginX
;
80 FLOAT baselineOriginY
;
81 DWRITE_COLOR_F runColor
;
83 } DWRITE_COLOR_GLYPH_RUN
;
88 uuid(d3e0e934
-22a0
-427e
-aae4
-7d9574b59db1
)
90 interface IDWriteTextRenderer1
: IDWriteTextRenderer
92 HRESULT DrawGlyphRun
(void *context
,
95 DWRITE_GLYPH_ORIENTATION_ANGLE angle
,
96 DWRITE_MEASURING_MODE mode
,
97 DWRITE_GLYPH_RUN
const *run
,
98 DWRITE_GLYPH_RUN_DESCRIPTION
const *rundescr
,
101 HRESULT DrawUnderline
(void *context
,
104 DWRITE_GLYPH_ORIENTATION_ANGLE angle
,
105 DWRITE_UNDERLINE
const *underline
,
108 HRESULT DrawStrikethrough
(void *context
,
111 DWRITE_GLYPH_ORIENTATION_ANGLE angle
,
112 DWRITE_STRIKETHROUGH
const *strikethrough
,
116 HRESULT DrawInlineObject
(void *context
,
119 DWRITE_GLYPH_ORIENTATION_ANGLE angle
,
120 IDWriteInlineObject
*inlineObject
,
130 uuid(efa008f9
-f7a1
-48bf
-b05c
-f224713cc0ff
)
132 interface IDWriteFontFallback
: IUnknown
134 HRESULT MapCharacters
(IDWriteTextAnalysisSource
*source,
137 IDWriteFontCollection
*basecollection
,
138 const WCHAR
*baseFamilyName
,
139 DWRITE_FONT_WEIGHT baseWeight
,
140 DWRITE_FONT_STYLE baseStyle
,
141 DWRITE_FONT_STRETCH baseStretch
,
142 UINT32
*mappedLength
,
143 IDWriteFont
**mappedFont
,
151 uuid(5f174b49
-0d8b
-4cfb
-8bca
-f1cce9d06c67
)
153 interface IDWriteTextFormat1
: IDWriteTextFormat
155 HRESULT SetVerticalGlyphOrientation
(DWRITE_VERTICAL_GLYPH_ORIENTATION orientation
);
156 DWRITE_VERTICAL_GLYPH_ORIENTATION GetVerticalGlyphOrientation
();
157 HRESULT SetLastLineWrapping
(BOOL lastline_wrapping_enabled
);
158 BOOL GetLastLineWrapping
();
159 HRESULT SetOpticalAlignment
(DWRITE_OPTICAL_ALIGNMENT alignment
);
160 DWRITE_OPTICAL_ALIGNMENT GetOpticalAlignment
();
161 HRESULT SetFontFallback
(IDWriteFontFallback
*fallback
);
162 HRESULT GetFontFallback
(IDWriteFontFallback
**fallback
);
168 uuid(1093c18f
-8d5e
-43f0
-b064
-0917311b525e
)
170 interface IDWriteTextLayout2
: IDWriteTextLayout1
172 HRESULT GetMetrics
(DWRITE_TEXT_METRICS1
*metrics
);
173 HRESULT SetVerticalGlyphOrientation
(DWRITE_VERTICAL_GLYPH_ORIENTATION orientation
);
174 DWRITE_VERTICAL_GLYPH_ORIENTATION GetVerticalGlyphOrientation
();
175 HRESULT SetLastLineWrapping
(BOOL lastline_wrapping_enabled
);
176 BOOL GetLastLineWrapping
();
177 HRESULT SetOpticalAlignment
(DWRITE_OPTICAL_ALIGNMENT alignment
);
178 DWRITE_OPTICAL_ALIGNMENT GetOpticalAlignment
();
179 HRESULT SetFontFallback
(IDWriteFontFallback
*fallback
);
180 HRESULT GetFontFallback
(IDWriteFontFallback
**fallback
);
186 uuid(553a9ff3
-5693-4df7
-b52b
-74806f7f2eb9
)
188 interface IDWriteTextAnalyzer2
: IDWriteTextAnalyzer1
190 HRESULT GetGlyphOrientationTransform
(DWRITE_GLYPH_ORIENTATION_ANGLE angle
,
194 DWRITE_MATRIX
*transform
196 HRESULT GetTypographicFeatures
(IDWriteFontFace
*fontface
,
197 DWRITE_SCRIPT_ANALYSIS analysis
,
198 const WCHAR
*localeName
,
200 UINT32
*actual_tagcount
,
201 DWRITE_FONT_FEATURE_TAG
*tags
204 HRESULT CheckTypographicFeature
(IDWriteFontFace
*fontface
,
205 DWRITE_SCRIPT_ANALYSIS analysis
,
206 const WCHAR
*localeName
,
207 DWRITE_FONT_FEATURE_TAG feature
,
209 const UINT16
*indices
,
210 UINT8
*feature_applies
217 uuid(fd882d06
-8aba
-4fb8
-b849
-8be8b73e14de
)
219 interface IDWriteFontFallbackBuilder
: IUnknown
221 HRESULT AddMapping
(const DWRITE_UNICODE_RANGE
*ranges
,
223 WCHAR
const **targetFamilyNames
,
224 UINT32 targetFamilyNamesCount
,
225 [defaultvalue(NULL
)] IDWriteFontCollection
*collection
,
226 [defaultvalue(NULL
)] WCHAR
const *localeName
,
227 [defaultvalue(NULL
)] WCHAR
const *baseFamilyName
,
228 [defaultvalue(1)] FLOAT scale
230 HRESULT AddMappings
(IDWriteFontFallback
*fallback
);
231 HRESULT CreateFontFallback
(IDWriteFontFallback
**fallback
);
237 uuid(29748ed6
-8c9c
-4a6a
-be0b
-d912e8538944
)
239 interface IDWriteFont2
: IDWriteFont1
247 uuid(d8b768ff
-64bc
-4e66
-982b
-ec8e87f693f7
)
249 interface IDWriteFontFace2
: IDWriteFontFace1
252 UINT32 GetColorPaletteCount
();
253 UINT32 GetPaletteEntryCount
();
254 HRESULT GetPaletteEntries
(UINT32 palette_index
,
255 UINT32 first_entry_index
,
257 DWRITE_COLOR_F
*entries
259 HRESULT GetRecommendedRenderingMode
(FLOAT fontEmSize
,
262 DWRITE_MATRIX
const *transform
,
264 DWRITE_OUTLINE_THRESHOLD threshold
,
265 DWRITE_MEASURING_MODE measuringmode
,
266 IDWriteRenderingParams
*params
,
267 DWRITE_RENDERING_MODE
*renderingmode
,
268 DWRITE_GRID_FIT_MODE
*gridfitmode
275 uuid(d31fbe17
-f157
-41a2
-8d24
-cb779e0560e8
)
277 interface IDWriteColorGlyphRunEnumerator
: IUnknown
279 HRESULT MoveNext
(BOOL
*hasRun
);
280 HRESULT GetCurrentRun
(DWRITE_COLOR_GLYPH_RUN
const **run
);
286 uuid(f9d711c3
-9777-40ae
-87e8
-3e5aF9bf0948
)
288 interface IDWriteRenderingParams2
: IDWriteRenderingParams1
290 DWRITE_GRID_FIT_MODE GetGridFitMode
();
296 uuid(0439fc60
-ca44
-4994-8dee
-3a9af7b732ec
)
298 interface IDWriteFactory2
: IDWriteFactory1
300 HRESULT GetSystemFontFallback
(IDWriteFontFallback
**fallback
);
301 HRESULT CreateFontFallbackBuilder
(IDWriteFontFallbackBuilder
**fallbackbuilder
);
302 HRESULT TranslateColorGlyphRun
(FLOAT originX
,
304 const DWRITE_GLYPH_RUN
*run
,
305 const DWRITE_GLYPH_RUN_DESCRIPTION
*rundescr
,
306 DWRITE_MEASURING_MODE mode
,
307 const DWRITE_MATRIX
*transform
,
308 UINT32 palette_index
,
309 IDWriteColorGlyphRunEnumerator
**colorlayers
312 HRESULT CreateCustomRenderingParams
(FLOAT gamma
,
314 FLOAT grayscalecontrast
,
315 FLOAT cleartypeLevel
,
316 DWRITE_PIXEL_GEOMETRY pixelGeometry
,
317 DWRITE_RENDERING_MODE renderingMode
,
318 DWRITE_GRID_FIT_MODE gridFitMode
,
319 IDWriteRenderingParams2
**params
322 HRESULT CreateGlyphRunAnalysis
(const DWRITE_GLYPH_RUN
*run
,
323 const DWRITE_MATRIX
*transform
,
324 DWRITE_RENDERING_MODE renderingMode
,
325 DWRITE_MEASURING_MODE measuringMode
,
326 DWRITE_GRID_FIT_MODE gridFitMode
,
327 DWRITE_TEXT_ANTIALIAS_MODE antialiasMode
,
330 IDWriteGlyphRunAnalysis
**analysis