mirror of
https://github.com/reactos/reactos.git
synced 2024-09-29 05:54:05 +00:00
[GDI32_APITEST] Improve CreateFontIndirect testcase
This commit is contained in:
parent
5053f1f571
commit
cdaff94c3d
|
@ -179,7 +179,11 @@ is_truetype_font_proc(const LOGFONTA *elf, const TEXTMETRICA *ntm,
|
|||
|
||||
static BOOL is_truetype_font_installed(HDC hDC, const char *name)
|
||||
{
|
||||
if (!EnumFontFamiliesA(hDC, name, is_truetype_font_proc, 0))
|
||||
LOGFONT lf;
|
||||
ZeroMemory(&lf, sizeof(lf));
|
||||
lf.lfCharSet = DEFAULT_CHARSET;
|
||||
lstrcpy(lf.lfFaceName, name);
|
||||
if (!EnumFontFamiliesExA(hDC, &lf, is_truetype_font_proc, 0, 0))
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -195,7 +199,10 @@ is_charset_font_proc(const LOGFONTA *elf, const TEXTMETRICA *ntm,
|
|||
|
||||
static BOOL is_charset_font_installed(HDC hDC, BYTE CharSet)
|
||||
{
|
||||
if (!EnumFontFamiliesA(hDC, NULL, is_charset_font_proc, CharSet))
|
||||
LOGFONT lf;
|
||||
ZeroMemory(&lf, sizeof(lf));
|
||||
lf.lfCharSet = DEFAULT_CHARSET;
|
||||
if (!EnumFontFamiliesExA(hDC, &lf, is_charset_font_proc, CharSet, 0))
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -215,7 +222,10 @@ is_fixed_charset_font_proc(const LOGFONTA *elf, const TEXTMETRICA *ntm,
|
|||
static BOOL
|
||||
is_fixed_charset_font_installed(HDC hDC, BYTE CharSet)
|
||||
{
|
||||
if (!EnumFontFamiliesA(hDC, NULL, is_fixed_charset_font_proc, CharSet))
|
||||
LOGFONT lf;
|
||||
ZeroMemory(&lf, sizeof(lf));
|
||||
lf.lfCharSet = DEFAULT_CHARSET;
|
||||
if (!EnumFontFamiliesExA(hDC, &lf, is_fixed_charset_font_proc, CharSet, 0))
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue