gdi32: Using a bitmap font as the fallback sans serif is a very bad idea.
This commit is contained in:
parent
ffbd30dd88
commit
7495d81495
|
@ -337,7 +337,7 @@ static struct list font_subst_list = LIST_INIT(font_subst_list);
|
|||
static struct list font_list = LIST_INIT(font_list);
|
||||
|
||||
static const WCHAR defSerif[] = {'T','i','m','e','s',' ','N','e','w',' ','R','o','m','a','n','\0'};
|
||||
static const WCHAR defSans[] = {'M','S',' ','S','a','n','s',' ','S','e','r','i','f','\0'};
|
||||
static const WCHAR defSans[] = {'A','r','i','a','l','\0'};
|
||||
static const WCHAR defFixed[] = {'C','o','u','r','i','e','r',' ','N','e','w','\0'};
|
||||
|
||||
static const WCHAR RegularW[] = {'R','e','g','u','l','a','r','\0'};
|
||||
|
|
|
@ -1654,6 +1654,36 @@ static void test_GetTextMetrics(void)
|
|||
ReleaseDC(0, hdc);
|
||||
}
|
||||
|
||||
static void test_non_existent_font(void)
|
||||
{
|
||||
LOGFONTA lf;
|
||||
HDC hdc;
|
||||
HFONT hfont;
|
||||
char buf[LF_FACESIZE];
|
||||
|
||||
if (!is_truetype_font_installed("Arial Black"))
|
||||
{
|
||||
skip("Arial not installed\n");
|
||||
return;
|
||||
}
|
||||
|
||||
hdc = GetDC(0);
|
||||
|
||||
memset(&lf, 0, sizeof(lf));
|
||||
lf.lfHeight = 100;
|
||||
lf.lfWeight = FW_REGULAR;
|
||||
lf.lfCharSet = ANSI_CHARSET;
|
||||
lf.lfPitchAndFamily = FF_SWISS;
|
||||
strcpy(lf.lfFaceName, "Non existent font");
|
||||
|
||||
hfont = CreateFontIndirectA(&lf);
|
||||
hfont = SelectObject(hdc, hfont);
|
||||
GetTextFaceA(hdc, sizeof(buf), buf);
|
||||
ok(!lstrcmpiA(buf, "Arial"), "Got %s\n", buf);
|
||||
DeleteObject(SelectObject(hdc, hfont));
|
||||
ReleaseDC(0, hdc);
|
||||
}
|
||||
|
||||
START_TEST(font)
|
||||
{
|
||||
init();
|
||||
|
@ -1670,6 +1700,8 @@ START_TEST(font)
|
|||
test_SetTextJustification();
|
||||
test_font_charset();
|
||||
test_GetFontUnicodeRanges();
|
||||
test_non_existent_font();
|
||||
|
||||
/* On Windows Arial has a lot of default charset aliases such as Arial Cyr,
|
||||
* I'd like to avoid them in this test.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue