Go to the source code of this file.
|
| void | Test_CreateFontIndirectA (void) |
| |
| void | Test_CreateFontIndirectW (void) |
| |
| void | Test_CreateFontIndirectExA (void) |
| |
| void | Test_CreateFontIndirectExW (void) |
| |
| static INT CALLBACK | is_truetype_font_proc (const LOGFONTA *elf, const TEXTMETRICA *ntm, DWORD type, LPARAM lParam) |
| |
| static BOOL | is_truetype_font_installed (HDC hDC, const char *name) |
| |
| static INT CALLBACK | is_charset_font_proc (const LOGFONTA *elf, const TEXTMETRICA *ntm, DWORD type, LPARAM lParam) |
| |
| static BOOL | is_charset_font_installed (HDC hDC, BYTE CharSet) |
| |
| static INT CALLBACK | is_fixed_charset_font_proc (const LOGFONTA *elf, const TEXTMETRICA *ntm, DWORD type, LPARAM lParam) |
| |
| static BOOL | is_fixed_charset_font_installed (HDC hDC, BYTE CharSet) |
| |
| static void | Test_FontPresence (void) |
| |
| static void | Test_FontSelectionEntry (HDC hDC, UINT nIndex, FONT_SEL_TEST *Entry) |
| |
| static void | Test_FontSelection (void) |
| |
| | START_TEST (CreateFontIndirect) |
| |
◆ _TMPF_VAR_PITCH [1/2]
◆ _TMPF_VAR_PITCH [2/2]
◆ trace_if
◆ FONT_SEL_TEST
◆ TRISTATE
◆ TRISTATE
◆ is_charset_font_installed()
| static BOOL is_charset_font_installed |
( |
HDC |
hDC, |
|
|
BYTE |
CharSet |
|
) |
| |
|
static |
Definition at line 200 of file CreateFontIndirect.c.
201{
208}
static INT CALLBACK is_charset_font_proc(const LOGFONTA *elf, const TEXTMETRICA *ntm, DWORD type, LPARAM lParam)
static void CharSet(RTF_Info *info)
int WINAPI EnumFontFamiliesExA(_In_ HDC, _In_ PLOGFONTA, _In_ FONTENUMPROCA, _In_ LPARAM, _In_ DWORD)
Referenced by Test_FontPresence(), and Test_FontSelection().
◆ is_charset_font_proc()
◆ is_fixed_charset_font_installed()
| static BOOL is_fixed_charset_font_installed |
( |
HDC |
hDC, |
|
|
BYTE |
CharSet |
|
) |
| |
|
static |
Definition at line 223 of file CreateFontIndirect.c.
224{
231}
static INT CALLBACK is_fixed_charset_font_proc(const LOGFONTA *elf, const TEXTMETRICA *ntm, DWORD type, LPARAM lParam)
Referenced by Test_FontPresence().
◆ is_fixed_charset_font_proc()
◆ is_truetype_font_installed()
Definition at line 180 of file CreateFontIndirect.c.
181{
189}
static INT CALLBACK is_truetype_font_proc(const LOGFONTA *elf, const TEXTMETRICA *ntm, DWORD type, LPARAM lParam)
CHAR lfFaceName[LF_FACESIZE]
Referenced by Test_FontPresence().
◆ is_truetype_font_proc()
◆ START_TEST()
Definition at line 765 of file CreateFontIndirect.c.
766{
773}
void Test_CreateFontIndirectExW(void)
static void Test_FontPresence(void)
void Test_CreateFontIndirectA(void)
static void Test_FontSelection(void)
void Test_CreateFontIndirectW(void)
void Test_CreateFontIndirectExA(void)
◆ Test_CreateFontIndirectA()
Definition at line 14 of file CreateFontIndirect.c.
15{
20
36 ok(
hFont != 0,
"CreateFontIndirectA failed\n");
37
38 memset(&elfedv2, 0,
sizeof(elfedv2));
43}
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
ENUMLOGFONTEXW elfEnumLogfontEx
WCHAR elfFullName[LF_FULLFACESIZE]
WCHAR lfFaceName[LF_FACESIZE]
int WINAPI GetObjectW(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
HFONT WINAPI CreateFontIndirectA(_In_ const LOGFONTA *)
#define OUT_DEFAULT_PRECIS
#define CLIP_DEFAULT_PRECIS
Referenced by START_TEST().
◆ Test_CreateFontIndirectExA()
| void Test_CreateFontIndirectExA |
( |
void |
| ) |
|
Definition at line 79 of file CreateFontIndirect.c.
80{
87
88 memset(&elfedva, 0,
sizeof(elfedva));
91
105
108
110 ok(
hFont != 0,
"CreateFontIndirectExA failed\n");
111
116
117 memset(&elfedva2, 0,
sizeof(elfedva2));
122}
BYTE elfFullName[LF_FULLFACESIZE]
ENUMLOGFONTEXA elfEnumLogfontEx
CHAR lfFaceName[LF_FACESIZE]
int WINAPI GetObjectA(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
HFONT WINAPI CreateFontIndirectExA(const ENUMLOGFONTEXDVA *)
Referenced by START_TEST().
◆ Test_CreateFontIndirectExW()
| void Test_CreateFontIndirectExW |
( |
void |
| ) |
|
Definition at line 125 of file CreateFontIndirect.c.
126{
133
134 memset(&elfedv, 0,
sizeof(elfedv));
137
151
154
156 ok(
hFont != 0,
"CreateFontIndirectExW failed\n");
157
158 memset(&elfedv2, 0,
sizeof(elfedv2));
163
164 memset(&elfedva, 0,
sizeof(elfedva));
169}
WCHAR lfFaceName[LF_FACESIZE]
HFONT WINAPI CreateFontIndirectExW(const ENUMLOGFONTEXDVW *)
Referenced by START_TEST().
◆ Test_CreateFontIndirectW()
Definition at line 46 of file CreateFontIndirect.c.
47{
52
68 ok(
hFont != 0,
"CreateFontIndirectW failed\n");
69
70 memset(&elfedv2, 0,
sizeof(elfedv2));
75
76}
HFONT WINAPI CreateFontIndirectW(_In_ const LOGFONTW *)
Referenced by START_TEST().
◆ Test_FontPresence()
Definition at line 234 of file CreateFontIndirect.c.
235{
237
239
246
265
283
285}
static BOOL is_charset_font_installed(HDC hDC, BYTE CharSet)
static BOOL is_fixed_charset_font_installed(HDC hDC, BYTE CharSet)
#define trace_if(val, msg)
static BOOL is_truetype_font_installed(HDC hDC, const char *name)
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
#define CHINESEBIG5_CHARSET
#define VIETNAMESE_CHARSET
BOOL WINAPI DeleteDC(_In_ HDC)
#define EASTEUROPE_CHARSET
Referenced by START_TEST().
◆ Test_FontSelection()
Definition at line 748 of file CreateFontIndirect.c.
749{
752
755 {
757 skip(
"charset not available: 0x%x\n",
g_Entries[nIndex].CharSetBefore);
758 else
760 }
762}
static FONT_SEL_TEST g_Entries[]
static void Test_FontSelectionEntry(HDC hDC, UINT nIndex, FONT_SEL_TEST *Entry)
Referenced by START_TEST().
◆ Test_FontSelectionEntry()
Definition at line 675 of file CreateFontIndirect.c.
676{
681
683
684 if (
Entry->FaceNameBefore[0])
686
688
693 else
695
699
704 else
706
708 ok(
hFont !=
NULL,
"Entry #%u: hFont failed\n", nIndex);
709
711 {
713
715 ok(
tm.tmCharSet ==
Entry->CharSetAfter,
"Entry #%u: CharSet mismatched, it was %u\n", nIndex,
tm.tmCharSet);
716
718 ok(
tm.tmWeight >=
FW_BOLD,
"Entry #%u: Weight was non-bold\n", nIndex);
720 ok(
tm.tmWeight <=
FW_MEDIUM,
"Entry #%u: Weight was bold\n", nIndex);
721
723 ok(
tm.tmItalic,
"Entry #%u: Italic was non-italic\n", nIndex);
725 ok(!
tm.tmItalic,
"Entry #%u: Italic was italic\n", nIndex);
726
728 ok(
tm.tmUnderlined,
"Entry #%u: Underlined was FALSE\n", nIndex);
730 ok(!
tm.tmUnderlined,
"Entry #%u: Underlined was TRUE\n", nIndex);
731
733 ok(
tm.tmStruckOut,
"Entry #%u: Struck-out was FALSE\n", nIndex);
735 ok(!
tm.tmStruckOut,
"Entry #%u: Struck-out was TRUE\n", nIndex);
736#if 0
738 ok(!(
tm.tmPitchAndFamily &
_TMPF_VAR_PITCH),
"Entry #%u: Pitch mismatched, it was non-fixed-pitch\n", nIndex);
740 ok((
tm.tmPitchAndFamily &
_TMPF_VAR_PITCH),
"Entry #%u: Pitch mismatched, it was fixed-pitch\n", nIndex);
741#endif
742 }
745}
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
BOOL WINAPI GetTextMetricsA(_In_ HDC, _Out_ LPTEXTMETRICA)
Referenced by Test_FontSelection().
◆ g_Entries