ReactOS 0.4.15-dev-5666-gc548b97
CreateFontIndirect.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS api tests
3 * LICENSE: GPL - See COPYING in the top level directory
4 * PURPOSE: Test for CreateFontIndirect
5 * PROGRAMMERS: Timo Kreuzer
6 * Katayama Hirofumi MZ
7 */
8
9#include "precomp.h"
10
11#define trace_if(val, msg) do { if (!(val)) trace(msg); } while (0)
12
13void
15{
16 LOGFONTA logfont;
18 ULONG ret;
19 ENUMLOGFONTEXDVW elfedv2;
20
21 logfont.lfHeight = 12;
22 logfont.lfWidth = 0;
23 logfont.lfEscapement = 0;
24 logfont.lfOrientation = 0;
25 logfont.lfWeight = FW_NORMAL;
26 logfont.lfItalic = 0;
27 logfont.lfUnderline = 0;
28 logfont.lfStrikeOut = 0;
29 logfont.lfCharSet = DEFAULT_CHARSET;
32 logfont.lfQuality = PROOF_QUALITY;
34 memset(logfont.lfFaceName, 'A', LF_FACESIZE);
35 hFont = CreateFontIndirectA(&logfont);
36 ok(hFont != 0, "CreateFontIndirectA failed\n");
37
38 memset(&elfedv2, 0, sizeof(elfedv2));
39 ret = GetObjectW(hFont, sizeof(elfedv2), &elfedv2);
40 ok(ret == sizeof(ENUMLOGFONTEXW) + 2*sizeof(DWORD), "ret = %ld\n", ret);
42 ok(elfedv2.elfEnumLogfontEx.elfFullName[0] == 0, "\n");
43}
44
45void
47{
48 LOGFONTW logfont;
50 ULONG ret;
51 ENUMLOGFONTEXDVW elfedv2;
52
53 logfont.lfHeight = 12;
54 logfont.lfWidth = 0;
55 logfont.lfEscapement = 0;
56 logfont.lfOrientation = 0;
57 logfont.lfWeight = FW_NORMAL;
58 logfont.lfItalic = 0;
59 logfont.lfUnderline = 0;
60 logfont.lfStrikeOut = 0;
61 logfont.lfCharSet = DEFAULT_CHARSET;
64 logfont.lfQuality = PROOF_QUALITY;
66 memset(logfont.lfFaceName, 'A', LF_FACESIZE * 2);
67 hFont = CreateFontIndirectW(&logfont);
68 ok(hFont != 0, "CreateFontIndirectW failed\n");
69
70 memset(&elfedv2, 0, sizeof(elfedv2));
71 ret = GetObjectW(hFont, sizeof(elfedv2), &elfedv2);
72 ok(ret == sizeof(ENUMLOGFONTEXW) + 2*sizeof(DWORD), "\n");
73 ok(elfedv2.elfEnumLogfontEx.elfLogFont.lfFaceName[LF_FACESIZE-1] == ((WCHAR)'A' << 8) + 'A', "\n");
74 ok(elfedv2.elfEnumLogfontEx.elfFullName[0] == 0, "\n");
75 /* Theres a bunch of data in elfFullName ... */
76}
77
78void
80{
81 ENUMLOGFONTEXDVA elfedva, elfedva2;
82 ENUMLOGFONTEXDVW elfedvw;
83 ENUMLOGFONTEXA *penumlfa;
84 LOGFONTA *plogfonta;
86 ULONG ret;
87
88 memset(&elfedva, 0, sizeof(elfedva));
89 penumlfa = &elfedva.elfEnumLogfontEx;
90 plogfonta = &elfedva.elfEnumLogfontEx.elfLogFont;
91
92 plogfonta->lfHeight = 12;
93 plogfonta->lfWidth = 0;
94 plogfonta->lfEscapement = 0;
95 plogfonta->lfOrientation = 0;
96 plogfonta->lfWeight = FW_NORMAL;
97 plogfonta->lfItalic = 0;
98 plogfonta->lfUnderline = 0;
99 plogfonta->lfStrikeOut = 0;
100 plogfonta->lfCharSet = DEFAULT_CHARSET;
103 plogfonta->lfQuality = PROOF_QUALITY;
104 plogfonta->lfPitchAndFamily = DEFAULT_PITCH;
105
106 memset(plogfonta->lfFaceName, 'A', LF_FACESIZE * sizeof(WCHAR));
107 memset(penumlfa->elfFullName, 'B', LF_FULLFACESIZE * sizeof(WCHAR));
108
109 hFont = CreateFontIndirectExA(&elfedva);
110 ok(hFont != 0, "CreateFontIndirectExA failed\n");
111
112 ret = GetObjectW(hFont, sizeof(elfedvw), &elfedvw);
113 ok(ret == sizeof(ENUMLOGFONTEXW) + 2*sizeof(DWORD), "\n");
114 ok(elfedvw.elfEnumLogfontEx.elfLogFont.lfFaceName[LF_FACESIZE-1] == 0, "\n");
115 ok(elfedvw.elfEnumLogfontEx.elfFullName[LF_FULLFACESIZE-1] == 0, "\n");
116
117 memset(&elfedva2, 0, sizeof(elfedva2));
118 ret = GetObjectA(hFont, sizeof(elfedva2), &elfedva2);
119 ok(ret == sizeof(ENUMLOGFONTEXDVA), "ret = %ld\n", ret);
120 ok(elfedva2.elfEnumLogfontEx.elfLogFont.lfFaceName[LF_FACESIZE-1] == 0, "\n");
121 ok(elfedva2.elfEnumLogfontEx.elfFullName[LF_FULLFACESIZE-1] == 0, "\n");
122}
123
124void
126{
127 ENUMLOGFONTEXDVW elfedv, elfedv2;
128 ENUMLOGFONTEXDVA elfedva;
129 ENUMLOGFONTEXW *penumlfw;
130 LOGFONTW *plogfontw;
131 HFONT hFont;
132 ULONG ret;
133
134 memset(&elfedv, 0, sizeof(elfedv));
135 penumlfw = &elfedv.elfEnumLogfontEx;
136 plogfontw = &elfedv.elfEnumLogfontEx.elfLogFont;
137
138 plogfontw->lfHeight = 12;
139 plogfontw->lfWidth = 0;
140 plogfontw->lfEscapement = 0;
141 plogfontw->lfOrientation = 0;
142 plogfontw->lfWeight = FW_NORMAL;
143 plogfontw->lfItalic = 0;
144 plogfontw->lfUnderline = 0;
145 plogfontw->lfStrikeOut = 0;
146 plogfontw->lfCharSet = DEFAULT_CHARSET;
149 plogfontw->lfQuality = PROOF_QUALITY;
150 plogfontw->lfPitchAndFamily = DEFAULT_PITCH;
151
152 memset(plogfontw->lfFaceName, 'A', LF_FACESIZE * sizeof(WCHAR));
153 memset(penumlfw->elfFullName, 'B', LF_FULLFACESIZE * sizeof(WCHAR));
154
155 hFont = CreateFontIndirectExW(&elfedv);
156 ok(hFont != 0, "CreateFontIndirectExW failed\n");
157
158 memset(&elfedv2, 0, sizeof(elfedv2));
159 ret = GetObjectW(hFont, sizeof(elfedv2), &elfedv2);
160 ok(ret == sizeof(ENUMLOGFONTEXW) + 2*sizeof(DWORD), "\n");
161 ok(elfedv2.elfEnumLogfontEx.elfLogFont.lfFaceName[LF_FACESIZE-1] == ((WCHAR)'A' << 8) + 'A', "\n");
162 ok(elfedv2.elfEnumLogfontEx.elfFullName[LF_FULLFACESIZE-1] == ((WCHAR)'B' << 8) + 'B', "\n");
163
164 memset(&elfedva, 0, sizeof(elfedva));
165 ret = GetObjectA(hFont, sizeof(elfedva), &elfedva);
166 ok(ret == sizeof(ENUMLOGFONTEXDVA), "\n");
167 ok(elfedva.elfEnumLogfontEx.elfLogFont.lfFaceName[LF_FACESIZE-1] == '?', "\n");
168 ok(elfedva.elfEnumLogfontEx.elfFullName[LF_FULLFACESIZE-1] == 0, "\n");
169}
170
171static INT CALLBACK
174{
175 if (type != TRUETYPE_FONTTYPE) return 1;
176
177 return 0;
178}
179
181{
182 LOGFONT lf;
183 ZeroMemory(&lf, sizeof(lf));
187 return TRUE;
188 return FALSE;
189}
190
191static INT CALLBACK
194{
195 if (ntm->tmCharSet == (BYTE)lParam)
196 return 0;
197 return 1;
198}
199
201{
202 LOGFONT lf;
203 ZeroMemory(&lf, sizeof(lf));
206 return TRUE;
207 return FALSE;
208}
209
210/* TMPF_FIXED_PITCH is confusing. brain-damaged api */
211#define _TMPF_VAR_PITCH TMPF_FIXED_PITCH
212
213static INT CALLBACK
216{
217 if (ntm->tmCharSet == (BYTE)lParam && !(ntm->tmPitchAndFamily & _TMPF_VAR_PITCH))
218 return 0;
219 return 1;
220}
221
222static BOOL
224{
225 LOGFONT lf;
226 ZeroMemory(&lf, sizeof(lf));
229 return TRUE;
230 return FALSE;
231}
232
233static void
235{
236 HDC hDC;
237
239
240 ok(is_truetype_font_installed(hDC, "Arial"), "'Arial' is not found\n");
241 ok(is_truetype_font_installed(hDC, "Courier New"), "'Courier New' is not found\n");
242 ok(is_truetype_font_installed(hDC, "Marlett"), "'Marlett' is not found\n");
243 ok(is_truetype_font_installed(hDC, "MS Shell Dlg"), "'MS Shell Dlg' is not found\n");
244 ok(is_truetype_font_installed(hDC, "Tahoma"), "'Tahoma' is not found\n");
245 ok(is_truetype_font_installed(hDC, "Times New Roman"), "'Times New Roman' is not found\n");
246
247 ok(is_charset_font_installed(hDC, ANSI_CHARSET), "ANSI_CHARSET fonts are not found\n");
248 ok(is_charset_font_installed(hDC, SYMBOL_CHARSET), "SYMBOL_CHARSET fonts are not found\n");
249 trace_if(is_charset_font_installed(hDC, SHIFTJIS_CHARSET), "SHIFTJIS_CHARSET fonts are not found\n");
250 trace_if(is_charset_font_installed(hDC, HANGUL_CHARSET), "HANGUL_CHARSET fonts are not found\n");
251 trace_if(is_charset_font_installed(hDC, GB2312_CHARSET), "GB2312_CHARSET fonts are not found\n");
252 trace_if(is_charset_font_installed(hDC, CHINESEBIG5_CHARSET), "CHINESEBIG5_CHARSET fonts are not found\n");
253 ok(is_charset_font_installed(hDC, OEM_CHARSET), "OEM_CHARSET fonts are not found\n");
254 trace_if(is_charset_font_installed(hDC, JOHAB_CHARSET), "JOHAB_CHARSET fonts are not found\n");
255 trace_if(is_charset_font_installed(hDC, HEBREW_CHARSET), "HEBREW_CHARSET fonts are not found\n");
256 trace_if(is_charset_font_installed(hDC, ARABIC_CHARSET), "ARABIC_CHARSET fonts are not found\n");
257 trace_if(is_charset_font_installed(hDC, GREEK_CHARSET), "GREEK_CHARSET fonts are not found\n");
258 trace_if(is_charset_font_installed(hDC, TURKISH_CHARSET), "TURKISH_CHARSET fonts are not found\n");
259 trace_if(is_charset_font_installed(hDC, VIETNAMESE_CHARSET), "VIETNAMESE_CHARSET fonts are not found\n");
260 trace_if(is_charset_font_installed(hDC, THAI_CHARSET), "THAI_CHARSET fonts are not found\n");
261 trace_if(is_charset_font_installed(hDC, EASTEUROPE_CHARSET), "EASTEUROPE_CHARSET fonts are not found\n");
262 trace_if(is_charset_font_installed(hDC, RUSSIAN_CHARSET), "RUSSIAN_CHARSET fonts are not found\n");
263 trace_if(is_charset_font_installed(hDC, MAC_CHARSET), "MAC_CHARSET fonts are not found\n");
264 trace_if(is_charset_font_installed(hDC, BALTIC_CHARSET), "BALTIC_CHARSET fonts are not found\n");
265
266 ok(is_fixed_charset_font_installed(hDC, ANSI_CHARSET), "fixed ANSI_CHARSET fonts are not found\n");
267 trace_if(is_fixed_charset_font_installed(hDC, SHIFTJIS_CHARSET), "fixed SHIFTJIS_CHARSET fonts are not found\n");
268 trace_if(is_fixed_charset_font_installed(hDC, HANGUL_CHARSET), "fixed HANGUL_CHARSET fonts are not found\n");
269 trace_if(is_fixed_charset_font_installed(hDC, GB2312_CHARSET), "fixed GB2312_CHARSET fonts are not found\n");
270 trace_if(is_fixed_charset_font_installed(hDC, CHINESEBIG5_CHARSET), "fixed CHINESEBIG5_CHARSET fonts are not found\n");
271 ok(is_fixed_charset_font_installed(hDC, OEM_CHARSET), "fixed OEM_CHARSET fonts are not found\n");
272 trace_if(is_fixed_charset_font_installed(hDC, JOHAB_CHARSET), "fixed JOHAB_CHARSET fonts are not found\n");
273 trace_if(is_fixed_charset_font_installed(hDC, HEBREW_CHARSET), "fixed HEBREW_CHARSET fonts are not found\n");
274 trace_if(is_fixed_charset_font_installed(hDC, ARABIC_CHARSET), "fixed ARABIC_CHARSET fonts are not found\n");
275 trace_if(is_fixed_charset_font_installed(hDC, GREEK_CHARSET), "fixed GREEK_CHARSET fonts are not found\n");
276 trace_if(is_fixed_charset_font_installed(hDC, TURKISH_CHARSET), "fixed TURKISH_CHARSET fonts are not found\n");
277 trace_if(is_fixed_charset_font_installed(hDC, VIETNAMESE_CHARSET), "fixed VIETNAMESE_CHARSET fonts are not found\n");
278 trace_if(is_fixed_charset_font_installed(hDC, THAI_CHARSET), "fixed THAI_CHARSET fonts are not found\n");
279 trace_if(is_fixed_charset_font_installed(hDC, EASTEUROPE_CHARSET), "fixed EASTEUROPE_CHARSET fonts are not found\n");
280 trace_if(is_fixed_charset_font_installed(hDC, RUSSIAN_CHARSET), "fixed RUSSIAN_CHARSET fonts are not found\n");
281 trace_if(is_fixed_charset_font_installed(hDC, MAC_CHARSET), "fixed MAC_CHARSET fonts are not found\n");
282 trace_if(is_fixed_charset_font_installed(hDC, BALTIC_CHARSET), "fixed BALTIC_CHARSET fonts are not found\n");
283
284 DeleteDC(hDC);
285}
286
287/* NOTE: TMPF_FIXED_PITCH is confusing and brain-dead. */
288#define _TMPF_VAR_PITCH TMPF_FIXED_PITCH
289
290typedef enum TRISTATE {
295
296typedef struct FONT_SEL_TEST {
298
301
304
307
310
313
317
319{
320 /* Entry #0: default */
321 {
322 "",
329 },
330 /* Entry #1: symbol font*/
331 {
332 "",
334 },
335 /* Entry #2: non-bold */
336 {
337 "",
340 },
341 /* Entry #3: bold */
342 {
343 "",
346 },
347 /* Entry #4: non-italic (without specifying bold) */
348 {
349 "",
353 },
354 /* Entry #5: italic (without specifying bold) */
355 {
356 "",
360 },
361 /* Entry #6: non-underline (without specifying bold) */
362 {
363 "",
368 },
369 /* Entry #7: underline (without specifying bold) */
370 {
371 "",
376 },
377 /* Entry #8: struck-out (without specifying bold) */
378 {
379 "",
385 },
386 /* Entry #9: non-struck-out (without specifying bold) */
387 {
388 "",
394 },
395 /* Entry #10: fixed-pitch (without specifying bold) */
396 {
397 "",
404 },
405 /* Entry #11: non-fixed-pitch (without specifying bold) */
406 {
407 "",
414 },
415 /* Entry #12: fixed-pitch and bold */
416 {
417 "",
424 },
425 /* Entry #13: non-fixed-pitch and bold */
426 {
427 "",
434 },
435 /* Entry #14: OEM_CHARSET */
436 {
437 "",
440 },
441 /* Entry #15: OEM_CHARSET and bold */
442 {
443 "",
446 },
447 /* Entry #16: OEM_CHARSET and fixed-pitch */
448 {
449 "",
456 },
457 /* Entry #17: CHINESEBIG5_CHARSET (Chinese) */
458 {
459 "",
462 },
463 /* Entry #18: CHINESEBIG5_CHARSET and bold */
464 {
465 "",
468 },
469 /* Entry #19: CHINESEBIG5_CHARSET and fixed-pitch */
470 {
471 "",
478 },
479 /* Entry #20: GB2312_CHARSET (Chinese) */
480 {
481 "",
484 },
485 /* Entry #21: GB2312_CHARSET and bold */
486 {
487 "",
490 },
491 /* Entry #22: GB2312_CHARSET and fixed-pitch */
492 {
493 "",
500 },
501 /* Entry #23: RUSSIAN_CHARSET (Russian) */
502 {
503 "",
506 },
507 /* Entry #24: RUSSIAN_CHARSET and bold */
508 {
509 "",
512 },
513 /* Entry #25: RUSSIAN_CHARSET and italic */
514 {
515 "",
518 TRUE, TS_TRUE,
519 },
520 /* Entry #26: RUSSIAN_CHARSET and fixed-pitch */
521 {
522 "",
529 },
530 /* Entry #27: SHIFTJIS_CHARSET (Japanese) */
531 {
532 "",
535 },
536 /* Entry #28: SHIFTJIS_CHARSET and bold */
537 {
538 "",
541 },
542 /* Entry #29: SHIFTJIS_CHARSET and fixed-pitch */
543 {
544 "",
551 },
552 /* Entry #30: HANGUL_CHARSET (Korean) */
553 {
554 "",
557 },
558 /* Entry #31: HANGUL_CHARSET and bold */
559 {
560 "",
563 },
564 /* Entry #32: HANGUL_CHARSET and fixed-pitch */
565 {
566 "",
573 },
574 /* Entry #33: JOHAB_CHARSET (Korean) */
575 {
576 "",
579 },
580 /* Entry #34: JOHAB_CHARSET and bold */
581 {
582 "",
585 },
586 /* Entry #35: JOHAB_CHARSET and fixed-pitch */
587 {
588 "",
595 },
596 /* Entry #36: THAI_CHARSET (Thai) */
597 {
598 "",
601 },
602 /* Entry #37: THAI_CHARSET and bold */
603 {
604 "",
607 },
608 /* Entry #38: THAI_CHARSET and fixed-pitch */
609 {
610 "",
617 },
618 /* Entry #39: GREEK_CHARSET (Greek) */
619 {
620 "",
623 },
624 /* Entry #40: GREEK_CHARSET and bold */
625 {
626 "",
629 },
630 /* Entry #41: GREEK_CHARSET and italic */
631 {
632 "",
636 },
637 /* Entry #42: GREEK_CHARSET and fixed-pitch */
638 {
639 "",
646 },
647 /* Entry #43: "Marlett" */
648 {
649 "Marlett",
651 },
652 /* Entry #43: "Arial" */
653 {
654 "Arial",
661 },
662 /* Entry #44: "Courier" */
663 {
664 "Courier",
671 }
672};
673
674static void
676{
677 LOGFONTA lf;
678 HFONT hFont;
679 HGDIOBJ hFontOld;
681
682 ZeroMemory(&lf, sizeof(lf));
683
684 if (Entry->FaceNameBefore[0])
685 lstrcpynA(lf.lfFaceName, Entry->FaceNameBefore, _countof(lf.lfFaceName));
686
687 lf.lfCharSet = Entry->CharSetBefore;
688
689 if (Entry->BoldBefore == TS_TRUE)
690 lf.lfWeight = FW_BOLD;
691 else if (Entry->BoldBefore == TS_FALSE)
692 lf.lfWeight = FW_NORMAL;
693 else
695
696 lf.lfItalic = Entry->ItalicBefore;
697 lf.lfUnderline = Entry->UnderlineBefore;
698 lf.lfStrikeOut = Entry->StruckOutBefore;
699
700 if (Entry->FixedPitchBefore == TS_TRUE)
702 else if (Entry->FixedPitchBefore == TS_FALSE)
704 else
706
708 ok(hFont != NULL, "Entry #%u: hFont failed\n", nIndex);
709
710 hFontOld = SelectObject(hDC, hFont);
711 {
712 ok(GetTextMetricsA(hDC, &tm), "Entry #%u: GetTextMetricsA failed\n", nIndex);
713
714 if (Entry->CharSetAfter != DEFAULT_CHARSET)
715 ok(tm.tmCharSet == Entry->CharSetAfter, "Entry #%u: CharSet mismatched, it was %u\n", nIndex, tm.tmCharSet);
716
717 if (Entry->BoldAfter == TS_TRUE)
718 ok(tm.tmWeight >= FW_BOLD, "Entry #%u: Weight was non-bold\n", nIndex);
719 else if (Entry->BoldAfter == TS_FALSE)
720 ok(tm.tmWeight <= FW_MEDIUM, "Entry #%u: Weight was bold\n", nIndex);
721
722 if (Entry->ItalicAfter == TS_TRUE)
723 ok(tm.tmItalic, "Entry #%u: Italic was non-italic\n", nIndex);
724 else if (Entry->ItalicAfter == TS_FALSE)
725 ok(!tm.tmItalic, "Entry #%u: Italic was italic\n", nIndex);
726
727 if (Entry->UnderlineAfter == TS_TRUE)
728 ok(tm.tmUnderlined, "Entry #%u: Underlined was FALSE\n", nIndex);
729 else if (Entry->UnderlineAfter == TS_FALSE)
730 ok(!tm.tmUnderlined, "Entry #%u: Underlined was TRUE\n", nIndex);
731
732 if (Entry->StruckOutAfter == TS_TRUE)
733 ok(tm.tmStruckOut, "Entry #%u: Struck-out was FALSE\n", nIndex);
734 else if (Entry->StruckOutAfter == TS_FALSE)
735 ok(!tm.tmStruckOut, "Entry #%u: Struck-out was TRUE\n", nIndex);
736#if 0 // FIXME: fails on WHS testbot
737 if (Entry->FixedPitchAfter == TS_TRUE)
738 ok(!(tm.tmPitchAndFamily & _TMPF_VAR_PITCH), "Entry #%u: Pitch mismatched, it was non-fixed-pitch\n", nIndex);
739 else if (Entry->FixedPitchAfter == TS_FALSE)
740 ok((tm.tmPitchAndFamily & _TMPF_VAR_PITCH), "Entry #%u: Pitch mismatched, it was fixed-pitch\n", nIndex);
741#endif
742 }
743 SelectObject(hDC, hFontOld);
745}
746
747static void
749{
750 UINT nIndex;
751 HDC hDC;
752
754 for (nIndex = 0; nIndex < _countof(g_Entries); ++nIndex)
755 {
756 if (!is_charset_font_installed(hDC, g_Entries[nIndex].CharSetBefore))
757 skip("charset not available: 0x%x\n", g_Entries[nIndex].CharSetBefore);
758 else
759 Test_FontSelectionEntry(hDC, nIndex, g_Entries + nIndex);
760 }
761 DeleteDC(hDC);
762}
763
764
766{
773}
774
static HDC hDC
Definition: 3dtext.c:33
void Test_CreateFontIndirectExW(void)
static void Test_FontPresence(void)
@ TS_UNKNOWN
@ TS_FALSE
@ TS_TRUE
static FONT_SEL_TEST g_Entries[]
void Test_CreateFontIndirectA(void)
#define _TMPF_VAR_PITCH
static INT CALLBACK is_fixed_charset_font_proc(const LOGFONTA *elf, const TEXTMETRICA *ntm, DWORD type, LPARAM lParam)
static BOOL is_charset_font_installed(HDC hDC, BYTE CharSet)
static void Test_FontSelection(void)
static BOOL is_fixed_charset_font_installed(HDC hDC, BYTE CharSet)
void Test_CreateFontIndirectW(void)
static void Test_FontSelectionEntry(HDC hDC, UINT nIndex, FONT_SEL_TEST *Entry)
void Test_CreateFontIndirectExA(void)
#define trace_if(val, msg)
static INT CALLBACK is_truetype_font_proc(const LOGFONTA *elf, const TEXTMETRICA *ntm, DWORD type, LPARAM lParam)
static INT CALLBACK is_charset_font_proc(const LOGFONTA *elf, const TEXTMETRICA *ntm, DWORD type, LPARAM lParam)
static BOOL is_truetype_font_installed(HDC hDC, const char *name)
#define ok(value,...)
Definition: atltest.h:57
#define skip(...)
Definition: atltest.h:64
#define START_TEST(x)
Definition: atltest.h:75
HFONT hFont
Definition: main.c:53
LPARAM lParam
Definition: combotst.c:139
#define LF_FACESIZE
Definition: dimm.idl:39
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define lstrcpynA
Definition: compat.h:751
#define CALLBACK
Definition: compat.h:35
static void CharSet(RTF_Info *info)
Definition: reader.c:2420
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
pKey DeleteObject()
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
unsigned int ULONG
Definition: retypes.h:1
static HDC
Definition: imagelist.c:92
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
unsigned int UINT
Definition: ndis.h:50
#define memset(x, y, z)
Definition: compat.h:39
#define _countof(array)
Definition: sndvol32.h:68
base of all file and directory entries
Definition: entries.h:83
CHAR FaceNameBefore[LF_FACESIZE]
TRISTATE FixedPitchBefore
TRISTATE FixedPitchAfter
BYTE lfStrikeOut
Definition: dimm.idl:49
BYTE lfClipPrecision
Definition: dimm.idl:52
BYTE lfUnderline
Definition: dimm.idl:48
BYTE lfQuality
Definition: dimm.idl:53
BYTE lfOutPrecision
Definition: dimm.idl:51
LONG lfOrientation
Definition: dimm.idl:45
BYTE lfItalic
Definition: dimm.idl:47
BYTE lfPitchAndFamily
Definition: dimm.idl:54
LONG lfHeight
Definition: dimm.idl:42
LONG lfEscapement
Definition: dimm.idl:44
BYTE lfCharSet
Definition: dimm.idl:50
LONG lfWeight
Definition: dimm.idl:46
CHAR lfFaceName[LF_FACESIZE]
Definition: dimm.idl:55
LONG lfWidth
Definition: dimm.idl:43
BYTE lfOutPrecision
Definition: dimm.idl:68
BYTE lfStrikeOut
Definition: dimm.idl:66
BYTE lfItalic
Definition: dimm.idl:64
LONG lfHeight
Definition: dimm.idl:59
LONG lfWeight
Definition: dimm.idl:63
WCHAR lfFaceName[LF_FACESIZE]
Definition: dimm.idl:72
LONG lfOrientation
Definition: dimm.idl:62
LONG lfWidth
Definition: dimm.idl:60
BYTE lfUnderline
Definition: dimm.idl:65
BYTE lfClipPrecision
Definition: dimm.idl:69
LONG lfEscapement
Definition: dimm.idl:61
BYTE lfCharSet
Definition: dimm.idl:67
BYTE lfQuality
Definition: dimm.idl:70
BYTE lfPitchAndFamily
Definition: dimm.idl:71
Definition: name.c:39
LOGFONTA elfLogFont
Definition: wingdi.h:2696
BYTE elfFullName[LF_FULLFACESIZE]
Definition: wingdi.h:2697
ENUMLOGFONTEXA elfEnumLogfontEx
Definition: wingdi.h:2774
ENUMLOGFONTEXW elfEnumLogfontEx
Definition: wingdi.h:2779
LOGFONTW elfLogFont
Definition: wingdi.h:2702
WCHAR elfFullName[LF_FULLFACESIZE]
Definition: wingdi.h:2703
CHAR lfFaceName[LF_FACESIZE]
Definition: wingdi.h:1894
WCHAR lfFaceName[LF_FACESIZE]
Definition: wingdi.h:1910
BYTE tmPitchAndFamily
Definition: wingdi.h:2379
BYTE tmCharSet
Definition: wingdi.h:2380
Definition: time.h:68
int32_t INT
Definition: typedefs.h:58
int ret
#define ZeroMemory
Definition: winbase.h:1670
#define lstrcpy
Definition: winbase.h:3745
LONG_PTR LPARAM
Definition: windef.h:208
#define FIXED_PITCH
Definition: wingdi.h:444
#define HANGUL_CHARSET
Definition: wingdi.h:388
#define DEFAULT_PITCH
Definition: wingdi.h:443
#define VARIABLE_PITCH
Definition: wingdi.h:445
#define RUSSIAN_CHARSET
Definition: wingdi.h:396
int WINAPI GetObjectW(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
#define FW_DONTCARE
Definition: wingdi.h:368
HFONT WINAPI CreateFontIndirectA(_In_ const LOGFONTA *)
int WINAPI GetObjectA(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
#define FW_BOLD
Definition: wingdi.h:378
#define FF_DONTCARE
Definition: wingdi.h:448
#define TRUETYPE_FONTTYPE
Definition: wingdi.h:1109
#define ARABIC_CHARSET
Definition: wingdi.h:394
int WINAPI EnumFontFamiliesExA(_In_ HDC, _In_ PLOGFONTA, _In_ FONTENUMPROCA, _In_ LPARAM, _In_ DWORD)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1539
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
#define DEFAULT_CHARSET
Definition: wingdi.h:384
#define THAI_CHARSET
Definition: wingdi.h:397
HFONT WINAPI CreateFontIndirectExW(const ENUMLOGFONTEXDVW *)
Definition: font.c:1681
#define GREEK_CHARSET
Definition: wingdi.h:391
#define JOHAB_CHARSET
Definition: wingdi.h:401
#define CHINESEBIG5_CHARSET
Definition: wingdi.h:390
#define OUT_DEFAULT_PRECIS
Definition: wingdi.h:415
#define ANSI_CHARSET
Definition: wingdi.h:383
#define PROOF_QUALITY
Definition: wingdi.h:438
#define CLIP_DEFAULT_PRECIS
Definition: wingdi.h:426
#define OEM_CHARSET
Definition: wingdi.h:400
#define FW_NORMAL
Definition: wingdi.h:373
#define VIETNAMESE_CHARSET
Definition: wingdi.h:402
BOOL WINAPI GetTextMetricsA(_In_ HDC, _Out_ LPTEXTMETRICA)
Definition: text.c:200
HFONT WINAPI CreateFontIndirectW(_In_ const LOGFONTW *)
BOOL WINAPI DeleteDC(_In_ HDC)
#define MAC_CHARSET
Definition: wingdi.h:403
#define HEBREW_CHARSET
Definition: wingdi.h:393
#define SHIFTJIS_CHARSET
Definition: wingdi.h:386
#define CreateFontIndirect
Definition: wingdi.h:4444
#define SYMBOL_CHARSET
Definition: wingdi.h:385
#define EASTEUROPE_CHARSET
Definition: wingdi.h:399
#define GB2312_CHARSET
Definition: wingdi.h:389
#define LF_FULLFACESIZE
Definition: wingdi.h:41
HFONT WINAPI CreateFontIndirectExA(const ENUMLOGFONTEXDVA *)
Definition: font.c:1657
#define BALTIC_CHARSET
Definition: wingdi.h:395
#define FW_MEDIUM
Definition: wingdi.h:375
#define TURKISH_CHARSET
Definition: wingdi.h:392
__wchar_t WCHAR
Definition: xmlstorage.h:180
char CHAR
Definition: xmlstorage.h:175
unsigned char BYTE
Definition: xxhash.c:193