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
821b36e0
Commit
821b36e0
authored
Aug 12, 2022
by
Zhiyi Zhang
Committed by
Alexandre Julliard
Aug 19, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32/tests: Add more tests for GetTextMetrics().
Signed-off-by:
Zhiyi Zhang
<
zzhang@codeweavers.com
>
parent
53f6d82e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
font.c
dlls/gdi32/tests/font.c
+16
-0
No files found.
dlls/gdi32/tests/font.c
View file @
821b36e0
...
...
@@ -4102,7 +4102,10 @@ static INT CALLBACK enum_truetype_font_proc(const LOGFONTA *lf, const TEXTMETRIC
static
void
test_GetTextMetrics
(
void
)
{
HFONT
old_hf
,
hf
;
TEXTMETRICA
tm
;
LOGFONTA
lf
;
BOOL
ret
;
HDC
hdc
;
INT
enumed
;
...
...
@@ -4113,6 +4116,19 @@ static void test_GetTextMetrics(void)
enumed
=
0
;
EnumFontFamiliesExA
(
hdc
,
&
lf
,
enum_truetype_font_proc
,
(
LPARAM
)
&
enumed
,
0
);
/* Test a bug triggered by rounding up FreeType ppem */
hf
=
CreateFontA
(
20
,
0
,
0
,
0
,
FW_REGULAR
,
FALSE
,
FALSE
,
FALSE
,
DEFAULT_CHARSET
,
OUT_DEFAULT_PRECIS
,
CLIP_DEFAULT_PRECIS
,
DEFAULT_QUALITY
,
DEFAULT_PITCH
,
"Tahoma"
);
ok
(
hf
!=
NULL
,
"CreateFontA failed, error %lu
\n
"
,
GetLastError
());
old_hf
=
SelectObject
(
hdc
,
hf
);
ret
=
GetTextMetricsA
(
hdc
,
&
tm
);
ok
(
ret
,
"GetTextMetricsA failed, error %lu
\n
"
,
GetLastError
());
todo_wine
ok
(
tm
.
tmHeight
<=
20
,
"Got unexpected tmHeight %ld
\n
"
,
tm
.
tmHeight
);
SelectObject
(
hdc
,
old_hf
);
DeleteObject
(
hf
);
ReleaseDC
(
0
,
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