Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
7495d814
Commit
7495d814
authored
Jul 05, 2007
by
Huw Davies
Committed by
Alexandre Julliard
Jul 05, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Using a bitmap font as the fallback sans serif is a very bad idea.
parent
ffbd30dd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
1 deletion
+33
-1
freetype.c
dlls/gdi32/freetype.c
+1
-1
font.c
dlls/gdi32/tests/font.c
+32
-0
No files found.
dlls/gdi32/freetype.c
View file @
7495d814
...
...
@@ -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'
};
...
...
dlls/gdi32/tests/font.c
View file @
7495d814
...
...
@@ -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.
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment