ReactOS 0.4.17-dev-923-g4c9a150
font.c
Go to the documentation of this file.
1/*
2 * Copyright (C) 2008 Tony Wasserka
3 *
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.
8 *
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.
13 *
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
17 *
18 */
19
20#define COBJMACROS
21#include "d3dx10.h"
22
23#include "wine/debug.h"
24
26
27#define D3DERR_INVALIDCALL 0x8876086c
28
30{
31 ID3DX10Font ID3DX10Font_iface;
33
35 HFONT hfont;
38};
39
40static inline struct d3dx_font *impl_from_ID3DX10Font(ID3DX10Font *iface)
41{
42 return CONTAINING_RECORD(iface, struct d3dx_font, ID3DX10Font_iface);
43}
44
45static HRESULT WINAPI d3dx_font_QueryInterface(ID3DX10Font *iface, REFIID riid, void **out)
46{
47 TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), out);
48
49 if (IsEqualGUID(riid, &IID_ID3DX10Font)
51 {
52 IUnknown_AddRef(iface);
53 *out = iface;
54 return S_OK;
55 }
56
57 WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid));
58
59 *out = NULL;
60 return E_NOINTERFACE;
61}
62
63static ULONG WINAPI d3dx_font_AddRef(ID3DX10Font *iface)
64{
65 struct d3dx_font *font = impl_from_ID3DX10Font(iface);
67
68 TRACE("%p increasing refcount to %lu.\n", iface, refcount);
69 return refcount;
70}
71
72static ULONG WINAPI d3dx_font_Release(ID3DX10Font *iface)
73{
74 struct d3dx_font *font = impl_from_ID3DX10Font(iface);
76
77 TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
78
79 if (!refcount)
80 {
81 DeleteObject(font->hfont);
82 DeleteDC(font->hdc);
83 ID3D10Device_Release(font->device);
84 free(font);
85 }
86 return refcount;
87}
88
90{
91 struct d3dx_font *font = impl_from_ID3DX10Font(iface);
92
93 TRACE("iface %p, device %p.\n", iface, device);
94
95 if (!device) return D3DERR_INVALIDCALL;
96 *device = font->device;
97 ID3D10Device_AddRef(font->device);
98
99 return S_OK;
100}
101
103{
104 struct d3dx_font *font = impl_from_ID3DX10Font(iface);
105
106 TRACE("iface %p, desc %p.\n", iface, desc);
107
108 if (!desc)
109 return D3DERR_INVALIDCALL;
110
111 memcpy(desc, &font->desc, FIELD_OFFSET(D3DX10_FONT_DESCA, FaceName));
112 WideCharToMultiByte(CP_ACP, 0, font->desc.FaceName, -1, desc->FaceName,
113 ARRAY_SIZE(desc->FaceName), NULL, NULL);
114
115 return S_OK;
116}
117
119{
120 struct d3dx_font *font = impl_from_ID3DX10Font(iface);
121
122 TRACE("iface %p, desc %p.\n", iface, desc);
123
124 if (!desc)
125 return D3DERR_INVALIDCALL;
126
127 *desc = font->desc;
128
129 return S_OK;
130}
131
133{
134 struct d3dx_font *font = impl_from_ID3DX10Font(iface);
135
136 TRACE("iface %p, metrics %p.\n", iface, metrics);
137
138 return GetTextMetricsA(font->hdc, metrics);
139}
140
142{
143 struct d3dx_font *font = impl_from_ID3DX10Font(iface);
144
145 TRACE("iface %p, metrics %p.\n", iface, metrics);
146
147 return GetTextMetricsW(font->hdc, metrics);
148}
149
150static HDC WINAPI d3dx_font_GetDC(ID3DX10Font *iface)
151{
152 struct d3dx_font *font = impl_from_ID3DX10Font(iface);
153
154 TRACE("iface %p.\n", iface);
155
156 return font->hdc;
157}
158
159static HRESULT WINAPI d3dx_font_GetGlyphData(ID3DX10Font *iface, UINT glyph,
160 ID3D10ShaderResourceView **view, RECT *black_box, POINT *cell_inc)
161{
162 FIXME("iface %p, glyph %u, view %p, black_box %p, cell_inc %p stub!\n",
163 iface, glyph, view, black_box, cell_inc);
164
165 return E_NOTIMPL;
166}
167
169{
170 struct d3dx_font *font = impl_from_ID3DX10Font(iface);
171 unsigned int i, count, start, end;
172 WORD *indices;
173 WCHAR *chars;
174
175 TRACE("iface %p, first %u, last %u.\n", iface, first, last);
176
177 if (last < first)
178 return S_OK;
179
180 count = last - first + 1;
181 indices = malloc(count * sizeof(*indices));
182 if (!indices)
183 return E_OUTOFMEMORY;
184
185 chars = malloc(count * sizeof(*chars));
186 if (!chars)
187 {
188 free(indices);
189 return E_OUTOFMEMORY;
190 }
191
192 for (i = 0; i < count; ++i)
193 chars[i] = first + i;
194
195 GetGlyphIndicesW(font->hdc, chars, count, indices, 0);
196
197 start = end = indices[0];
198 for (i = 1; i < count; ++i)
199 {
200 if (indices[i] == end + 1)
201 {
202 end = indices[i];
203 continue;
204 }
206 start = end = indices[i];
207 }
209
210 free(chars);
211 free(indices);
212
213 return S_OK;
214}
215
217{
218 FIXME("iface %p, first %u, last %u stub!\n", iface, first, last);
219
220 return E_NOTIMPL;
221}
222
223static HRESULT WINAPI d3dx_font_PreloadTextA(ID3DX10Font *iface, const char *string, INT count)
224{
225 WCHAR *wstr;
226 HRESULT hr;
227 int countW;
228
229 TRACE("iface %p, string %s, count %d.\n", iface, debugstr_an(string, count), count);
230
231 if (!string && !count)
232 return S_OK;
233
234 if (!string)
235 return D3DERR_INVALIDCALL;
236
237 countW = MultiByteToWideChar(CP_ACP, 0, string, count < 0 ? -1 : count, NULL, 0);
238
239 if (!(wstr = malloc(countW * sizeof(*wstr))))
240 return E_OUTOFMEMORY;
241
242 MultiByteToWideChar(CP_ACP, 0, string, count < 0 ? -1 : count, wstr, countW);
243
244 hr = ID3DX10Font_PreloadTextW(iface, wstr, count < 0 ? countW - 1 : countW);
245
246 free(wstr);
247
248 return hr;
249}
250
251static HRESULT WINAPI d3dx_font_PreloadTextW(ID3DX10Font *iface, const WCHAR *string, INT count)
252{
253 struct d3dx_font *font = impl_from_ID3DX10Font(iface);
254 WORD *indices;
255 int i;
256
257 TRACE("iface %p, string %s, count %d.\n", iface, debugstr_wn(string, count), count);
258
259 if (!string && !count)
260 return S_OK;
261
262 if (!string)
263 return D3DERR_INVALIDCALL;
264
265 if (count < 0)
266 count = lstrlenW(string);
267
268 indices = malloc(count * sizeof(*indices));
269 if (!indices)
270 return E_OUTOFMEMORY;
271
272 GetGlyphIndicesW(font->hdc, string, count, indices, 0);
273
274 for (i = 0; i < count; ++i)
276
277 free(indices);
278
279 return S_OK;
280}
281
282static INT WINAPI d3dx_font_DrawTextA(ID3DX10Font *iface, ID3DX10Sprite *sprite,
283 const char *string, INT count, RECT *rect, UINT format, D3DXCOLOR color)
284{
285 int ret, countW;
286 WCHAR *wstr;
287
288 TRACE("iface %p, sprite %p, string %s, count %d, rect %s, format %#x, color {%.8e,%.8e,%.8e,%8e}.\n",
290 color.r, color.g, color.b, color.a);
291
292 if (!string || !count)
293 return 0;
294
295 if (!(countW = MultiByteToWideChar(CP_ACP, 0, string, count < 0 ? -1 : count, NULL, 0)))
296 return 0;
297
298 if (!(wstr = calloc(countW, sizeof(*wstr))))
299 return 0;
300
301 MultiByteToWideChar(CP_ACP, 0, string, count < 0 ? -1 : count, wstr, countW);
302
303 ret = ID3DX10Font_DrawTextW(iface, sprite, wstr, count < 0 ? countW - 1 : countW,
304 rect, format, color);
305
306 free(wstr);
307
308 return ret;
309}
310
311static INT WINAPI d3dx_font_DrawTextW(ID3DX10Font *iface, ID3DX10Sprite *sprite,
312 const WCHAR *string, INT count, RECT *rect, UINT format, D3DXCOLOR color)
313{
314 FIXME("iface %p, sprite %p, string %s, count %d, rect %s, format %#x, color {%.8e,%.8e,%.8e,%.8e} stub!\n",
316 format, color.r, color.g, color.b, color.a);
317
318 return E_NOTIMPL;
319}
320
321static const ID3DX10FontVtbl d3dx_font_vtbl =
322{
323 /*** IUnknown methods ***/
327 /*** ID3DX10Font methods ***/
341};
342
344 UINT miplevels, BOOL italic, UINT charset, UINT precision, UINT quality,
345 UINT pitchandfamily, const char *facename, ID3DX10Font **font)
346{
348
349 TRACE("device %p, height %d, width %u, weight %u, miplevels %u, italic %#x, charset %u, "
350 "precision %u, quality %u, pitchandfamily %u, facename %s, font %p.\n",
351 device, height, width, weight, miplevels, italic, charset, precision, quality,
352 pitchandfamily, debugstr_a(facename), font);
353
354 if (!device || !font)
355 return D3DERR_INVALIDCALL;
356
357 desc.Height = height;
358 desc.Width = width;
359 desc.Weight = weight;
360 desc.MipLevels = miplevels;
361 desc.Italic = italic;
362 desc.CharSet = charset;
363 desc.OutputPrecision = precision;
364 desc.Quality = quality;
365 desc.PitchAndFamily = pitchandfamily;
366 if (facename)
367 lstrcpyA(desc.FaceName, facename);
368 else
369 desc.FaceName[0] = 0;
370
372}
373
375 UINT miplevels, BOOL italic, UINT charset, UINT precision, UINT quality,
376 UINT pitchandfamily, const WCHAR *facename, ID3DX10Font **font)
377{
379
380 TRACE("device %p, height %d, width %u, weight %u, miplevels %u, italic %#x, charset %u, "
381 "precision %u, quality %u, pitchandfamily %u, facename %s, font %p.\n",
382 device, height, width, weight, miplevels, italic, charset, precision, quality,
383 pitchandfamily, debugstr_w(facename), font);
384
385 if (!device || !font)
386 return D3DERR_INVALIDCALL;
387
388 desc.Height = height;
389 desc.Width = width;
390 desc.Weight = weight;
391 desc.MipLevels = miplevels;
392 desc.Italic = italic;
393 desc.CharSet = charset;
394 desc.OutputPrecision = precision;
395 desc.Quality = quality;
396 desc.PitchAndFamily = pitchandfamily;
397 if (facename)
398 lstrcpyW(desc.FaceName, facename);
399 else
400 desc.FaceName[0] = '\0';
401
403}
404
406 ID3DX10Font **font)
407{
408 D3DX10_FONT_DESCW descW;
409
410 TRACE("device %p, desc %p, font %p.\n", device, desc, font);
411
412 if (!device || !desc || !font)
413 return D3DERR_INVALIDCALL;
414
415 memcpy(&descW, desc, FIELD_OFFSET(D3DX10_FONT_DESCA, FaceName));
416 MultiByteToWideChar(CP_ACP, 0, desc->FaceName, -1, descW.FaceName, ARRAY_SIZE(descW.FaceName));
417 return D3DX10CreateFontIndirectW(device, &descW, font);
418}
419
421 ID3DX10Font **font)
422{
423 struct d3dx_font *object;
424
425 TRACE("device %p, desc %p, font %p.\n", device, desc, font);
426
427 if (!device || !desc || !font)
428 return D3DERR_INVALIDCALL;
429
430 *font = NULL;
431
432 if (!(object = calloc(1, sizeof(*object))))
433 return E_OUTOFMEMORY;
434
435 object->hdc = CreateCompatibleDC(NULL);
436 if (!object->hdc)
437 {
438 free(object);
439 return E_FAIL;
440 }
441
442 object->hfont = CreateFontW(desc->Height, desc->Width, 0, 0, desc->Weight, desc->Italic, FALSE, FALSE, desc->CharSet,
443 desc->OutputPrecision, CLIP_DEFAULT_PRECIS, desc->Quality, desc->PitchAndFamily, desc->FaceName);
444 if (!object->hfont)
445 {
446 DeleteDC(object->hdc);
447 free(object);
448 return E_FAIL;
449 }
450 SelectObject(object->hdc, object->hfont);
451
452 object->ID3DX10Font_iface.lpVtbl = &d3dx_font_vtbl;
453 object->refcount = 1;
454 object->device = device;
455 object->desc = *desc;
456 ID3D10Device_AddRef(device);
457
458 *font = &object->ID3DX10Font_iface;
459
460 return S_OK;
461}
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
static const char * wine_dbgstr_rect(const RECT *prc)
Definition: atltest.h:160
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define ARRAY_SIZE(A)
Definition: main.h:20
#define FIXME(fmt,...)
Definition: precomp.h:53
#define WARN(fmt,...)
Definition: precomp.h:61
const GUID IID_IUnknown
CFF_Charset charset
Definition: cffcmap.c:137
RECT rect
Definition: combotst.c:67
#define ID3DX10Font_DrawTextW(p, a, b, c, d, e, f)
Definition: d3dx10core.h:262
#define ID3DX10Font_PreloadTextW(p, a, b)
Definition: d3dx10core.h:260
#define ID3DX10Font_PreloadGlyphs(p, a, b)
Definition: d3dx10core.h:258
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_NOTIMPL
Definition: ddrawi.h:99
#define E_FAIL
Definition: ddrawi.h:102
#define free
Definition: debug_ros.c:5
#define malloc
Definition: debug_ros.c:4
HRESULT hr
Definition: delayimp.cpp:582
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
HRESULT WINAPI D3DX10CreateFontIndirectW(ID3D10Device *device, const D3DX10_FONT_DESCW *desc, ID3DX10Font **font)
Definition: font.c:420
HRESULT WINAPI D3DX10CreateFontW(ID3D10Device *device, INT height, UINT width, UINT weight, UINT miplevels, BOOL italic, UINT charset, UINT precision, UINT quality, UINT pitchandfamily, const WCHAR *facename, ID3DX10Font **font)
Definition: font.c:374
static HRESULT WINAPI d3dx_font_GetDescW(ID3DX10Font *iface, D3DX10_FONT_DESCW *desc)
Definition: font.c:118
static HRESULT WINAPI d3dx_font_GetDevice(ID3DX10Font *iface, ID3D10Device **device)
Definition: font.c:89
static BOOL WINAPI d3dx_font_GetTextMetricsW(ID3DX10Font *iface, TEXTMETRICW *metrics)
Definition: font.c:141
static INT WINAPI d3dx_font_DrawTextW(ID3DX10Font *iface, ID3DX10Sprite *sprite, const WCHAR *string, INT count, RECT *rect, UINT format, D3DXCOLOR color)
Definition: font.c:311
static HRESULT WINAPI d3dx_font_QueryInterface(ID3DX10Font *iface, REFIID riid, void **out)
Definition: font.c:45
static HRESULT WINAPI d3dx_font_GetDescA(ID3DX10Font *iface, D3DX10_FONT_DESCA *desc)
Definition: font.c:102
static HRESULT WINAPI d3dx_font_GetGlyphData(ID3DX10Font *iface, UINT glyph, ID3D10ShaderResourceView **view, RECT *black_box, POINT *cell_inc)
Definition: font.c:159
static struct d3dx_font * impl_from_ID3DX10Font(ID3DX10Font *iface)
Definition: font.c:40
#define D3DERR_INVALIDCALL
Definition: font.c:27
static ULONG WINAPI d3dx_font_Release(ID3DX10Font *iface)
Definition: font.c:72
static HRESULT WINAPI d3dx_font_PreloadTextW(ID3DX10Font *iface, const WCHAR *string, INT count)
Definition: font.c:251
static INT WINAPI d3dx_font_DrawTextA(ID3DX10Font *iface, ID3DX10Sprite *sprite, const char *string, INT count, RECT *rect, UINT format, D3DXCOLOR color)
Definition: font.c:282
HRESULT WINAPI D3DX10CreateFontA(ID3D10Device *device, INT height, UINT width, UINT weight, UINT miplevels, BOOL italic, UINT charset, UINT precision, UINT quality, UINT pitchandfamily, const char *facename, ID3DX10Font **font)
Definition: font.c:343
HRESULT WINAPI D3DX10CreateFontIndirectA(ID3D10Device *device, const D3DX10_FONT_DESCA *desc, ID3DX10Font **font)
Definition: font.c:405
static HRESULT WINAPI d3dx_font_PreloadCharacters(ID3DX10Font *iface, UINT first, UINT last)
Definition: font.c:168
static BOOL WINAPI d3dx_font_GetTextMetricsA(ID3DX10Font *iface, TEXTMETRICA *metrics)
Definition: font.c:132
static HRESULT WINAPI d3dx_font_PreloadGlyphs(ID3DX10Font *iface, UINT first, UINT last)
Definition: font.c:216
static HRESULT WINAPI d3dx_font_PreloadTextA(ID3DX10Font *iface, const char *string, INT count)
Definition: font.c:223
static ULONG WINAPI d3dx_font_AddRef(ID3DX10Font *iface)
Definition: font.c:63
static const ID3DX10FontVtbl d3dx_font_vtbl
Definition: font.c:321
static HDC WINAPI d3dx_font_GetDC(ID3DX10Font *iface)
Definition: font.c:150
#define CP_ACP
Definition: compat.h:109
static __inline const char * debugstr_an(const char *s, int n)
Definition: compat.h:55
#define lstrcpyW
Definition: compat.h:749
#define WideCharToMultiByte
Definition: compat.h:111
#define MultiByteToWideChar
Definition: compat.h:110
#define lstrlenW
Definition: compat.h:750
return ret
Definition: mutex.c:147
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned int BOOL
Definition: ntddk_ex.h:94
pKey DeleteObject()
GLuint start
Definition: gl.h:1545
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
GLuint GLuint end
Definition: gl.h:1545
GLint GLint GLsizei width
Definition: gl.h:1546
GLuint GLuint GLsizei GLenum const GLvoid * indices
Definition: gl.h:1545
GLuint color
Definition: glext.h:6243
GLsizei GLenum const GLvoid GLuint GLsizei GLfloat * metrics
Definition: glext.h:11745
const GLint * first
Definition: glext.h:5794
GLenum GLint GLint * precision
Definition: glext.h:7539
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
unsigned int UINT
Definition: sysinfo.c:13
REFIID riid
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
int quality
Definition: jpeglib.h:994
#define debugstr_guid
Definition: kernel32.h:35
#define debugstr_a
Definition: kernel32.h:31
#define debugstr_wn
Definition: kernel32.h:33
#define debugstr_w
Definition: kernel32.h:32
LPSTR WINAPI lstrcpyA(LPSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:100
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
static HDC
Definition: imagelist.c:88
D3D11_SHADER_VARIABLE_DESC desc
Definition: reflection.c:1683
static const LARGE_INTEGER *static const HANDLE const LARGE_INTEGER *static PSLIST_ENTRY PSLIST_ENTRY last
Definition: sync.c:64
Definition: mk_font.cpp:20
short WCHAR
Definition: pedump.c:58
long LONG
Definition: pedump.c:60
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define REFIID
Definition: guiddef.h:118
#define calloc
Definition: rosglue.h:14
weight
Definition: sortkey.c:157
#define TRACE(s)
Definition: solgame.cpp:4
Definition: dcommon.idl:28
WCHAR FaceName[LF_FACESIZE]
Definition: d3dx10core.h:69
Definition: font.c:30
ID3DX10Font ID3DX10Font_iface
Definition: font.c:31
LONG refcount
Definition: font.c:32
D3DX10_FONT_DESCW desc
Definition: font.c:36
HDC hdc
Definition: font.c:34
ID3D10Device * device
Definition: font.c:37
HFONT hfont
Definition: font.c:35
Definition: devices.h:37
Definition: sprite.c:36
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
int32_t INT
Definition: typedefs.h:58
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
Definition: wcsftime.cpp:383
#define WINAPI
Definition: msvc.h:6
#define E_NOINTERFACE
Definition: winerror.h:3479
BOOL WINAPI GetTextMetricsW(_In_ HDC, _Out_ LPTEXTMETRICW)
Definition: text.c:221
DWORD WINAPI GetGlyphIndicesW(_In_ HDC hdc, _In_reads_(c) LPCWSTR lpstr, _In_ int c, _Out_writes_(c) LPWORD pgi, _In_ DWORD fl)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1546
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
HFONT WINAPI CreateFontW(_In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_opt_ LPCWSTR)
#define CLIP_DEFAULT_PRECIS
Definition: wingdi.h:426
BOOL WINAPI GetTextMetricsA(_In_ HDC, _Out_ LPTEXTMETRICA)
Definition: text.c:200
BOOL WINAPI DeleteDC(_In_ HDC)