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 IDWriteFontFace3
;
23 interface IDWriteFont3
;
24 interface IDWriteFontSet
;
26 typedef enum DWRITE_LOCALITY
28 DWRITE_LOCALITY_REMOTE
,
29 DWRITE_LOCALITY_PARTIAL
,
33 typedef enum DWRITE_RENDERING_MODE1
35 DWRITE_RENDERING_MODE1_DEFAULT
,
36 DWRITE_RENDERING_MODE1_ALIASED
,
37 DWRITE_RENDERING_MODE1_GDI_CLASSIC
,
38 DWRITE_RENDERING_MODE1_GDI_NATURAL
,
39 DWRITE_RENDERING_MODE1_NATURAL
,
40 DWRITE_RENDERING_MODE1_NATURAL_SYMMETRIC
,
41 DWRITE_RENDERING_MODE1_OUTLINE
,
42 DWRITE_RENDERING_MODE1_NATURAL_SYMMETRIC_DOWNSAMPLED
43 } DWRITE_RENDERING_MODE1
;
48 uuid(b7924baa
-391b
-412a
-8c5c
-e44cc2d867dc
)
50 interface IDWriteRenderingParams3
: IDWriteRenderingParams2
52 DWRITE_RENDERING_MODE1 GetRenderingMode1
();
58 uuid(da20d8ef
-812a
-4c43
-9802-62ec4abd7adf
)
60 interface IDWriteFontFamily1
: IDWriteFontFamily
62 DWRITE_LOCALITY GetFontLocality
(UINT32 index
);
63 HRESULT GetFont
(UINT32 index
, IDWriteFont3
**font
);
64 HRESULT GetFontFaceReference
(UINT32 index
, IDWriteFontFaceReference
**reference
);
70 uuid(53585141-d9f8
-4095-8321-d73cf6bd116c
)
72 interface IDWriteFontCollection1
: IDWriteFontCollection
74 HRESULT GetFontSet
(IDWriteFontSet
**fontset
);
75 HRESULT GetFontFamily
(UINT32 index
, IDWriteFontFamily1
**family
);
81 uuid(5e7fa7ca
-dde3
-424c
-89f0
-9fcd6fed58cd
)
83 interface IDWriteFontFaceReference
: IUnknown
85 HRESULT CreateFontFace
(IDWriteFontFace3
**fontface
);
86 HRESULT CreateFontFaceWithSimulations
(DWRITE_FONT_SIMULATIONS simulations
,
87 IDWriteFontFace3
**fontface
);
88 BOOL Equals
(IDWriteFontFaceReference
*reference
);
89 UINT32 GetFontFaceIndex
();
90 DWRITE_FONT_SIMULATIONS GetSimulations
();
91 HRESULT GetFontFile
(IDWriteFontFile
**fontfile
);
92 UINT64 GetLocalFileSize
();
94 HRESULT GetFileTime
(FILETIME
*writetime
);
95 DWRITE_LOCALITY GetLocality
();
96 HRESULT EnqueueFontDownloadRequest
();
97 HRESULT EnqueueCharacterDownloadRequest
(WCHAR
const *chars
, UINT32 count
);
98 HRESULT EnqueueGlyphDownloadRequest
(UINT16
const *glyphs
, UINT32 count
);
99 HRESULT EnqueueFileFragmentDownloadRequest
(UINT64 offset
, UINT64 size
);
105 uuid(da20d8ef
-812a
-4c43
-9802-62ec4abd7ade
)
107 interface IDWriteFontList1
: IDWriteFontList
109 DWRITE_LOCALITY GetFontLocality
(UINT32 index
);
110 HRESULT GetFont
(UINT32 index
, IDWriteFont3
**font
);
111 HRESULT GetFontFaceReference
(UINT32 index
, IDWriteFontFaceReference
**reference
);
117 uuid(d37d7598
-09be
-4222-a236
-2081341cc1f2
)
119 interface IDWriteFontFace3
: IDWriteFontFace2
121 HRESULT GetFontFaceReference
(IDWriteFontFaceReference
**reference
);
122 void GetPanose
(DWRITE_PANOSE
*panose
);
123 DWRITE_FONT_WEIGHT GetWeight
();
124 DWRITE_FONT_STRETCH GetStretch
();
125 DWRITE_FONT_STYLE GetStyle
();
126 HRESULT GetFamilyNames
(IDWriteLocalizedStrings
**names
);
127 HRESULT GetFaceNames
(IDWriteLocalizedStrings
**names
);
128 HRESULT GetInformationalStrings
(DWRITE_INFORMATIONAL_STRING_ID stringid
,
129 IDWriteLocalizedStrings
**strings
,
131 BOOL HasCharacter
(UINT32 character
);
132 HRESULT GetRecommendedRenderingMode
(
136 DWRITE_MATRIX
const *transform
,
138 DWRITE_OUTLINE_THRESHOLD threshold
,
139 DWRITE_MEASURING_MODE measuring_mode
,
140 IDWriteRenderingParams
*params
,
141 DWRITE_RENDERING_MODE1
*rendering_mode
,
142 DWRITE_GRID_FIT_MODE
*gridfit_mode
);
143 BOOL IsCharacterLocal
(UINT32 character
);
144 BOOL IsGlyphLocal
(UINT16 glyph
);
145 HRESULT AreCharactersLocal
(WCHAR
const *characters
,
146 UINT32 count
, BOOL enqueue_if_not
, BOOL
*are_local
);
147 HRESULT AreGlyphsLocal
(UINT16
*const glyphs
, UINT32 count
,
148 BOOL enqueue_if_not
, BOOL
*are_local
);
154 uuid(cfee3140
-1257-47ca
-8b85
-31bfcf3f2d0e
)
156 interface IDWriteStringList
: IUnknown
159 HRESULT GetLocaleNameLength
(UINT32 index
, UINT32
*length
);
160 HRESULT GetLocaleName
(UINT32 index
, WCHAR
*name
, UINT32 size
);
161 HRESULT GetStringLength
(UINT32 index
, UINT32
*length
);
162 HRESULT GetString
(UINT32 index
, WCHAR
*string, UINT32 size
);
165 typedef struct DWRITE_LINE_METRICS1
168 UINT32 trailingWhitespaceLength
;
169 UINT32 newlineLength
;
175 } DWRITE_LINE_METRICS1
;
177 typedef enum DWRITE_FONT_LINE_GAP_USAGE
179 DWRITE_FONT_LINE_GAP_USAGE_DEFAULT
,
180 DWRITE_FONT_LINE_GAP_USAGE_DISABLED
,
181 DWRITE_FONT_LINE_GAP_USAGE_ENABLED
182 } DWRITE_FONT_LINE_GAP_USAGE
;
184 typedef struct DWRITE_LINE_SPACING
186 DWRITE_LINE_SPACING_METHOD method
;
190 DWRITE_FONT_LINE_GAP_USAGE fontLineGapUsage
;
191 } DWRITE_LINE_SPACING
;
196 uuid(f67e0edd
-9e3d
-4ecc
-8c32
-4183253dfe70
)
198 interface IDWriteTextFormat2
: IDWriteTextFormat1
200 HRESULT SetLineSpacing
(DWRITE_LINE_SPACING
const *spacing
);
201 HRESULT GetLineSpacing
(DWRITE_LINE_SPACING
*spacing
);
207 uuid(07ddcd52
-020e-4de8
-ac33
-6c953d83f92d
)
209 interface IDWriteTextLayout3
: IDWriteTextLayout2
211 HRESULT InvalidateLayout
();
212 HRESULT SetLineSpacing
(DWRITE_LINE_SPACING
const *spacing
);
213 HRESULT GetLineSpacing
(DWRITE_LINE_SPACING
*spacing
);
214 HRESULT GetLineMetrics
(DWRITE_LINE_METRICS1
*metrics
, UINT32 max_count
, UINT32
*count
);