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 typedef struct _D3DCOLORVALUE
70 typedef D3DCOLORVALUE DWRITE_COLOR_F
;
72 typedef struct DWRITE_COLOR_GLYPH_RUN
74 DWRITE_GLYPH_RUN glyphRun
;
75 DWRITE_GLYPH_RUN_DESCRIPTION
* glyphRunDescription
;
76 FLOAT baselineOriginX
;
77 FLOAT baselineOriginY
;
78 DWRITE_COLOR_F runColor
;
80 } DWRITE_COLOR_GLYPH_RUN
;
85 uuid(d3e0e934
-22a0
-427e
-aae4
-7d9574b59db1
)
87 interface IDWriteTextRenderer1
: IDWriteTextRenderer
89 HRESULT DrawGlyphRun
(void *context
,
92 DWRITE_GLYPH_ORIENTATION_ANGLE angle
,
93 DWRITE_MEASURING_MODE mode
,
94 DWRITE_GLYPH_RUN
const *run
,
95 DWRITE_GLYPH_RUN_DESCRIPTION
const *rundescr
,
98 HRESULT DrawUnderline
(void *context
,
101 DWRITE_GLYPH_ORIENTATION_ANGLE angle
,
102 DWRITE_UNDERLINE
const *underline
,
105 HRESULT DrawStrikethrough
(void *context
,
108 DWRITE_GLYPH_ORIENTATION_ANGLE angle
,
109 DWRITE_STRIKETHROUGH
const *strikethrough
,
113 HRESULT DrawInlineObject
(void *context
,
116 DWRITE_GLYPH_ORIENTATION_ANGLE angle
,
117 IDWriteInlineObject
*inlineObject
,
127 uuid(efa008f9
-f7a1
-48bf
-b05c
-f224713cc0ff
)
129 interface IDWriteFontFallback
: IUnknown
131 HRESULT MapCharacters
(IDWriteTextAnalysisSource
*source,
134 IDWriteFontCollection
*basecollection
,
135 const WCHAR
*baseFamilyName
,
136 DWRITE_FONT_WEIGHT baseWeight
,
137 DWRITE_FONT_STYLE baseStyle
,
138 DWRITE_FONT_STRETCH baseStretch
,
139 UINT32
*mappedLength
,
140 IDWriteFont
**mappedFont
,
148 uuid(5f174b49
-0d8b
-4cfb
-8bca
-f1cce9d06c67
)
150 interface IDWriteTextFormat1
: IDWriteTextFormat
152 HRESULT SetVerticalGlyphOrientation
(DWRITE_VERTICAL_GLYPH_ORIENTATION orientation
);
153 DWRITE_VERTICAL_GLYPH_ORIENTATION GetVerticalGlyphOrientation
();
154 HRESULT SetLastLineWrapping
(BOOL lastline_wrapping_enabled
);
155 BOOL GetLastLineWrapping
();
156 HRESULT SetOpticalAlignment
(DWRITE_OPTICAL_ALIGNMENT alignment
);
157 DWRITE_OPTICAL_ALIGNMENT GetOpticalAlignment
();
158 HRESULT SetFontFallback
(IDWriteFontFallback
*fallback
);
159 HRESULT GetFontFallback
(IDWriteFontFallback
**fallback
);
165 uuid(1093c18f
-8d5e
-43f0
-b064
-0917311b525e
)
167 interface IDWriteTextLayout2
: IDWriteTextLayout1
169 HRESULT GetMetrics
(DWRITE_TEXT_METRICS1
*metrics
);
170 HRESULT SetVerticalGlyphOrientation
(DWRITE_VERTICAL_GLYPH_ORIENTATION orientation
);
171 DWRITE_VERTICAL_GLYPH_ORIENTATION GetVerticalGlyphOrientation
();
172 HRESULT SetLastLineWrapping
(BOOL lastline_wrapping_enabled
);
173 BOOL GetLastLineWrapping
();
174 HRESULT SetOpticalAlignment
(DWRITE_OPTICAL_ALIGNMENT alignment
);
175 DWRITE_OPTICAL_ALIGNMENT GetOpticalAlignment
();
176 HRESULT SetFontFallback
(IDWriteFontFallback
*fallback
);
177 HRESULT GetFontFallback
(IDWriteFontFallback
**fallback
);
183 uuid(553a9ff3
-5693-4df7
-b52b
-74806f7f2eb9
)
185 interface IDWriteTextAnalyzer2
: IDWriteTextAnalyzer1
187 HRESULT GetGlyphOrientationTransform
(DWRITE_GLYPH_ORIENTATION_ANGLE angle
,
191 DWRITE_MATRIX
*transform
193 HRESULT GetTypographicFeatures
(IDWriteFontFace
*fontface
,
194 DWRITE_SCRIPT_ANALYSIS analysis
,
195 const WCHAR
*localeName
,
197 UINT32
*actual_tagcount
,
198 DWRITE_FONT_FEATURE_TAG
*tags
201 HRESULT CheckTypographicFeature
(IDWriteFontFace
*fontface
,
202 DWRITE_SCRIPT_ANALYSIS analysis
,
203 const WCHAR
*localeName
,
204 DWRITE_FONT_FEATURE_TAG feature
,
206 const UINT16
*indices
,
207 UINT8
*feature_applies
214 uuid(fd882d06
-8aba
-4fb8
-b849
-8be8b73e14de
)
216 interface IDWriteFontFallbackBuilder
: IUnknown
218 HRESULT AddMapping
(const DWRITE_UNICODE_RANGE
*ranges
,
220 WCHAR
const **targetFamilyNames
,
221 UINT32 targetFamilyNamesCount
,
222 [defaultvalue(NULL
)] IDWriteFontCollection
*collection
,
223 [defaultvalue(NULL
)] WCHAR
const *localeName
,
224 [defaultvalue(NULL
)] WCHAR
const *baseFamilyName
,
225 [defaultvalue(1)] FLOAT scale
227 HRESULT AddMappings
(IDWriteFontFallback
*fallback
);
228 HRESULT CreateFontFallback
(IDWriteFontFallback
**fallback
);
234 uuid(29748ed6
-8c9c
-4a6a
-be0b
-d912e8538944
)
236 interface IDWriteFont2
: IDWriteFont1
244 uuid(d8b768ff
-64bc
-4e66
-982b
-ec8e87f693f7
)
246 interface IDWriteFontFace2
: IDWriteFontFace1
249 UINT32 GetColorPaletteCount
();
250 UINT32 GetPaletteEntryCount
();
251 HRESULT GetPaletteEntries
(UINT32 palette_index
,
252 UINT32 first_entry_index
,
254 DWRITE_COLOR_F
*entries
256 HRESULT GetRecommendedRenderingMode
(FLOAT fontEmSize
,
259 DWRITE_MATRIX
const *transform
,
261 DWRITE_OUTLINE_THRESHOLD threshold
,
262 DWRITE_MEASURING_MODE measuringmode
,
263 IDWriteRenderingParams
*params
,
264 DWRITE_RENDERING_MODE
*renderingmode
,
265 DWRITE_GRID_FIT_MODE
*gridfitmode
272 uuid(d31fbe17
-f157
-41a2
-8d24
-cb779e0560e8
)
274 interface IDWriteColorGlyphRunEnumerator
: IUnknown
276 HRESULT MoveNext
(BOOL
*hasRun
);
277 HRESULT GetCurrentRun
(DWRITE_COLOR_GLYPH_RUN
const **run
);
283 uuid(f9d711c3
-9777-40ae
-87e8
-3e5aF9bf0948
)
285 interface IDWriteRenderingParams2
: IDWriteRenderingParams1
287 DWRITE_GRID_FIT_MODE GetGridFitMode
();
293 uuid(0439fc60
-ca44
-4994-8dee
-3a9af7b732ec
)
295 interface IDWriteFactory2
: IDWriteFactory1
297 HRESULT GetSystemFontFallback
(IDWriteFontFallback
**fallback
);
298 HRESULT CreateFontFallbackBuilder
(IDWriteFontFallbackBuilder
**fallbackbuilder
);
299 HRESULT TranslateColorGlyphRun
(FLOAT originX
,
301 const DWRITE_GLYPH_RUN
*run
,
302 const DWRITE_GLYPH_RUN_DESCRIPTION
*rundescr
,
303 DWRITE_MEASURING_MODE mode
,
304 const DWRITE_MATRIX
*transform
,
305 UINT32 palette_index
,
306 IDWriteColorGlyphRunEnumerator
**colorlayers
309 HRESULT CreateCustomRenderingParams
(FLOAT gamma
,
311 FLOAT grayscalecontrast
,
312 FLOAT cleartypeLevel
,
313 DWRITE_PIXEL_GEOMETRY pixelGeometry
,
314 DWRITE_RENDERING_MODE renderingMode
,
315 DWRITE_GRID_FIT_MODE gridFitMode
,
316 IDWriteRenderingParams2
**params
319 HRESULT CreateGlyphRunAnalysis
(const DWRITE_GLYPH_RUN
*run
,
320 const DWRITE_MATRIX
*transform
,
321 DWRITE_RENDERING_MODE renderingMode
,
322 DWRITE_MEASURING_MODE measuringMode
,
323 DWRITE_GRID_FIT_MODE gridFitMode
,
324 DWRITE_TEXT_ANTIALIAS_MODE antialiasMode
,
327 IDWriteGlyphRunAnalysis
**analysis