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
5c2976ee
Commit
5c2976ee
authored
Aug 23, 2011
by
Grazvydas Ignotas
Committed by
Alexandre Julliard
Aug 24, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32/tests: Check for exact fonts before doing fullname test.
parent
4a463e06
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
7 deletions
+28
-7
font.c
dlls/gdi32/tests/font.c
+28
-7
No files found.
dlls/gdi32/tests/font.c
View file @
5c2976ee
...
...
@@ -3733,6 +3733,28 @@ static void test_EnumFonts(void)
DeleteDC
(
hdc
);
}
static
INT
CALLBACK
is_font_installed_fullname_proc
(
const
LOGFONT
*
lf
,
const
TEXTMETRIC
*
ntm
,
DWORD
type
,
LPARAM
lParam
)
{
const
ENUMLOGFONT
*
elf
=
(
const
ENUMLOGFONT
*
)
lf
;
const
char
*
fullname
=
(
const
char
*
)
lParam
;
if
(
!
strcmp
((
const
char
*
)
elf
->
elfFullName
,
fullname
))
return
0
;
return
1
;
}
static
BOOL
is_font_installed_fullname
(
const
char
*
family
,
const
char
*
fullname
)
{
HDC
hdc
=
GetDC
(
0
);
BOOL
ret
=
FALSE
;
if
(
!
EnumFontFamiliesA
(
hdc
,
family
,
is_font_installed_fullname_proc
,
(
LPARAM
)
fullname
))
ret
=
TRUE
;
ReleaseDC
(
0
,
hdc
);
return
ret
;
}
static
void
test_fullname
(
void
)
{
static
const
char
*
TestName
[]
=
{
"Lucida Sans Demibold Roman"
,
"Lucida Sans Italic"
};
...
...
@@ -3742,13 +3764,6 @@ static void test_fullname(void)
HDC
hdc
;
int
i
;
/* Lucida Sans comes with XP SP2 or later */
if
(
!
is_truetype_font_installed
(
"Lucida Sans"
))
{
skip
(
"Lucida Sans is not installed
\n
"
);
return
;
}
hdc
=
CreateCompatibleDC
(
0
);
ok
(
hdc
!=
NULL
,
"CreateCompatibleDC failed
\n
"
);
...
...
@@ -3763,6 +3778,12 @@ static void test_fullname(void)
for
(
i
=
0
;
i
<
sizeof
(
TestName
)
/
sizeof
(
TestName
[
0
]);
i
++
)
{
if
(
!
is_font_installed_fullname
(
"Lucida Sans"
,
TestName
[
i
]))
{
skip
(
"%s is not installed
\n
"
,
TestName
[
i
]);
continue
;
}
lstrcpyA
(
lf
.
lfFaceName
,
TestName
[
i
]);
hfont
=
CreateFontIndirectA
(
&
lf
);
ok
(
hfont
!=
0
,
"CreateFontIndirectA failed
\n
"
);
...
...
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