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
ab7fe608
Commit
ab7fe608
authored
May 08, 2012
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
May 08, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Add a test for ntmCellHeight calculation.
parent
94f0da9c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
font.c
dlls/gdi32/tests/font.c
+9
-2
No files found.
dlls/gdi32/tests/font.c
View file @
ab7fe608
...
...
@@ -2842,7 +2842,7 @@ out:
return
r
;
}
static
void
test_text_metrics
(
const
LOGFONT
A
*
lf
)
static
void
test_text_metrics
(
const
LOGFONT
*
lf
,
const
NEWTEXTMETRIC
*
ntm
)
{
HDC
hdc
;
HFONT
hfont
,
hfont_old
;
...
...
@@ -2851,6 +2851,7 @@ static void test_text_metrics(const LOGFONTA *lf)
LONG
size
,
ret
;
const
char
*
font_name
=
lf
->
lfFaceName
;
DWORD
cmap_first
=
0
,
cmap_last
=
0
;
UINT
ascent
,
descent
,
cell_height
;
cmap_type
cmap_type
;
BOOL
sys_lang_non_english
;
...
...
@@ -2879,6 +2880,12 @@ static void test_text_metrics(const LOGFONTA *lf)
ret
=
GetFontData
(
hdc
,
MS_OS2_TAG
,
0
,
&
tt_os2
,
size
);
ok
(
ret
==
size
,
"GetFontData should return %u not %u
\n
"
,
size
,
ret
);
ascent
=
GET_BE_WORD
(
tt_os2
.
usWinAscent
);
descent
=
GET_BE_WORD
(
tt_os2
.
usWinDescent
);
cell_height
=
ascent
+
descent
;
ok
(
ntm
->
ntmCellHeight
==
cell_height
,
"%s: ntmCellHeight %u != %u, os2.usWinAscent/os2.usWinDescent %u/%u
\n
"
,
font_name
,
ntm
->
ntmCellHeight
,
cell_height
,
ascent
,
descent
);
SetLastError
(
0xdeadbeef
);
ret
=
GetTextMetricsA
(
hdc
,
&
tmA
);
ok
(
ret
,
"GetTextMetricsA error %u
\n
"
,
GetLastError
());
...
...
@@ -3067,7 +3074,7 @@ static INT CALLBACK enum_truetype_font_proc(const LOGFONT *lf, const TEXTMETRIC
if
(
type
==
TRUETYPE_FONTTYPE
)
{
(
*
enumed
)
++
;
test_text_metrics
(
lf
);
test_text_metrics
(
lf
,
(
const
NEWTEXTMETRIC
*
)
ntm
);
}
return
1
;
}
...
...
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