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
820c14ca
Commit
820c14ca
authored
Aug 28, 2013
by
Huw Davies
Committed by
Alexandre Julliard
Aug 28, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32/tests: Separate out the metrics checking code.
parent
2f76829c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
24 deletions
+31
-24
font.c
dlls/gdi32/tests/font.c
+31
-24
No files found.
dlls/gdi32/tests/font.c
View file @
820c14ca
...
...
@@ -1663,36 +1663,21 @@ todo_wine {
ReleaseDC
(
0
,
hdc
);
}
static
void
test_height_selection
(
void
)
struct
font_data
{
const
char
face_name
[
LF_FACESIZE
];
int
requested_height
;
int
weight
,
height
,
ascent
,
descent
,
int_leading
,
ext_leading
,
dpi
;
};
static
void
test_height
(
HDC
hdc
,
const
struct
font_data
*
fd
)
{
static
const
struct
font_data
{
const
char
face_name
[
LF_FACESIZE
];
int
requested_height
;
int
weight
,
height
,
ascent
,
descent
,
int_leading
,
ext_leading
,
dpi
;
}
fd
[]
=
{
{
"Tahoma"
,
-
12
,
FW_NORMAL
,
14
,
12
,
2
,
2
,
0
,
96
},
{
"Tahoma"
,
-
24
,
FW_NORMAL
,
29
,
24
,
5
,
5
,
0
,
96
},
{
"Tahoma"
,
-
48
,
FW_NORMAL
,
58
,
48
,
10
,
10
,
0
,
96
},
{
"Tahoma"
,
-
96
,
FW_NORMAL
,
116
,
96
,
20
,
20
,
0
,
96
},
{
"Tahoma"
,
-
192
,
FW_NORMAL
,
232
,
192
,
40
,
40
,
0
,
96
},
{
"Tahoma"
,
12
,
FW_NORMAL
,
12
,
10
,
2
,
2
,
0
,
96
},
{
"Tahoma"
,
24
,
FW_NORMAL
,
24
,
20
,
4
,
4
,
0
,
96
},
{
"Tahoma"
,
48
,
FW_NORMAL
,
48
,
40
,
8
,
8
,
0
,
96
},
{
"Tahoma"
,
96
,
FW_NORMAL
,
96
,
80
,
16
,
17
,
0
,
96
},
{
"Tahoma"
,
192
,
FW_NORMAL
,
192
,
159
,
33
,
33
,
0
,
96
}
};
HDC
hdc
;
LOGFONT
lf
;
HFONT
hfont
,
old_hfont
;
TEXTMETRIC
tm
;
INT
ret
,
i
;
hdc
=
CreateCompatibleDC
(
0
);
assert
(
hdc
);
for
(
i
=
0
;
i
<
sizeof
(
fd
)
/
sizeof
(
fd
[
0
]);
i
++
)
for
(
i
=
0
;
fd
[
i
].
face_name
[
0
];
i
++
)
{
if
(
!
is_truetype_font_installed
(
fd
[
i
].
face_name
))
{
...
...
@@ -1727,6 +1712,28 @@ static void test_height_selection(void)
SelectObject
(
hdc
,
old_hfont
);
DeleteObject
(
hfont
);
}
}
static
void
test_height_selection
(
void
)
{
static
const
struct
font_data
tahoma
[]
=
{
{
"Tahoma"
,
-
12
,
FW_NORMAL
,
14
,
12
,
2
,
2
,
0
,
96
},
{
"Tahoma"
,
-
24
,
FW_NORMAL
,
29
,
24
,
5
,
5
,
0
,
96
},
{
"Tahoma"
,
-
48
,
FW_NORMAL
,
58
,
48
,
10
,
10
,
0
,
96
},
{
"Tahoma"
,
-
96
,
FW_NORMAL
,
116
,
96
,
20
,
20
,
0
,
96
},
{
"Tahoma"
,
-
192
,
FW_NORMAL
,
232
,
192
,
40
,
40
,
0
,
96
},
{
"Tahoma"
,
12
,
FW_NORMAL
,
12
,
10
,
2
,
2
,
0
,
96
},
{
"Tahoma"
,
24
,
FW_NORMAL
,
24
,
20
,
4
,
4
,
0
,
96
},
{
"Tahoma"
,
48
,
FW_NORMAL
,
48
,
40
,
8
,
8
,
0
,
96
},
{
"Tahoma"
,
96
,
FW_NORMAL
,
96
,
80
,
16
,
17
,
0
,
96
},
{
"Tahoma"
,
192
,
FW_NORMAL
,
192
,
159
,
33
,
33
,
0
,
96
},
{
""
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
}
};
HDC
hdc
=
CreateCompatibleDC
(
0
);
assert
(
hdc
);
test_height
(
hdc
,
tahoma
);
DeleteDC
(
hdc
);
}
...
...
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