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
566d455b
Commit
566d455b
authored
Jan 23, 2011
by
Greg Geldorp
Committed by
Alexandre Julliard
Jan 24, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32/tests: Fix font tests on Arabic machines.
parent
5b1d4617
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
17 deletions
+31
-17
font.c
dlls/gdi32/tests/font.c
+31
-17
No files found.
dlls/gdi32/tests/font.c
View file @
566d455b
...
...
@@ -670,6 +670,7 @@ static void test_bitmap_font_metrics(void)
int
weight
,
height
,
ascent
,
descent
,
int_leading
,
ext_leading
;
int
ave_char_width
,
max_char_width
,
dpi
;
DWORD
ansi_bitfield
;
WORD
skip_lang_id
;
}
fd
[]
=
{
{
"MS Sans Serif"
,
FW_NORMAL
,
13
,
11
,
2
,
2
,
0
,
5
,
11
,
96
,
FS_LATIN1
|
FS_LATIN2
|
FS_CYRILLIC
},
...
...
@@ -741,19 +742,23 @@ static void test_bitmap_font_metrics(void)
{
"Small Fonts"
,
FW_NORMAL
,
3
,
2
,
1
,
0
,
0
,
1
,
2
,
96
,
FS_LATIN1
},
{
"Small Fonts"
,
FW_NORMAL
,
3
,
2
,
1
,
0
,
0
,
1
,
8
,
96
,
FS_LATIN2
|
FS_CYRILLIC
},
{
"Small Fonts"
,
FW_NORMAL
,
3
,
2
,
1
,
0
,
0
,
2
,
4
,
96
,
FS_JISJAPAN
},
{
"Small Fonts"
,
FW_NORMAL
,
5
,
4
,
1
,
1
,
0
,
3
,
4
,
96
,
FS_LATIN1
},
{
"Small Fonts"
,
FW_NORMAL
,
5
,
4
,
1
,
1
,
0
,
3
,
4
,
96
,
FS_LATIN1
,
LANG_ARABIC
},
{
"Small Fonts"
,
FW_NORMAL
,
5
,
4
,
1
,
1
,
0
,
2
,
8
,
96
,
FS_LATIN2
|
FS_CYRILLIC
},
{
"Small Fonts"
,
FW_NORMAL
,
5
,
4
,
1
,
0
,
0
,
3
,
6
,
96
,
FS_JISJAPAN
},
{
"Small Fonts"
,
FW_NORMAL
,
6
,
5
,
1
,
1
,
0
,
3
,
13
,
96
,
FS_LATIN1
},
{
"Small Fonts"
,
FW_NORMAL
,
6
,
5
,
1
,
1
,
0
,
3
,
13
,
96
,
FS_LATIN1
,
LANG_ARABIC
},
{
"Small Fonts"
,
FW_NORMAL
,
6
,
5
,
1
,
1
,
0
,
3
,
8
,
96
,
FS_LATIN2
|
FS_CYRILLIC
},
{
"Small Fonts"
,
FW_NORMAL
,
6
,
5
,
1
,
1
,
0
,
3
,
8
,
96
,
FS_ARABIC
},
{
"Small Fonts"
,
FW_NORMAL
,
6
,
5
,
1
,
0
,
0
,
4
,
8
,
96
,
FS_JISJAPAN
},
{
"Small Fonts"
,
FW_NORMAL
,
8
,
7
,
1
,
1
,
0
,
4
,
7
,
96
,
FS_LATIN1
},
{
"Small Fonts"
,
FW_NORMAL
,
8
,
7
,
1
,
1
,
0
,
4
,
7
,
96
,
FS_LATIN1
,
LANG_ARABIC
},
{
"Small Fonts"
,
FW_NORMAL
,
8
,
7
,
1
,
1
,
0
,
4
,
8
,
96
,
FS_LATIN2
|
FS_CYRILLIC
},
{
"Small Fonts"
,
FW_NORMAL
,
8
,
7
,
1
,
1
,
0
,
4
,
8
,
96
,
FS_ARABIC
},
{
"Small Fonts"
,
FW_NORMAL
,
8
,
7
,
1
,
0
,
0
,
5
,
10
,
96
,
FS_JISJAPAN
},
{
"Small Fonts"
,
FW_NORMAL
,
10
,
8
,
2
,
2
,
0
,
4
,
8
,
96
,
FS_LATIN1
|
FS_LATIN2
},
{
"Small Fonts"
,
FW_NORMAL
,
10
,
8
,
2
,
2
,
0
,
4
,
8
,
96
,
FS_LATIN1
|
FS_LATIN2
,
LANG_ARABIC
},
{
"Small Fonts"
,
FW_NORMAL
,
10
,
8
,
2
,
2
,
0
,
5
,
8
,
96
,
FS_CYRILLIC
},
{
"Small Fonts"
,
FW_NORMAL
,
10
,
8
,
2
,
2
,
0
,
4
,
9
,
96
,
FS_ARABIC
},
{
"Small Fonts"
,
FW_NORMAL
,
10
,
8
,
2
,
0
,
0
,
6
,
12
,
96
,
FS_JISJAPAN
},
{
"Small Fonts"
,
FW_NORMAL
,
11
,
9
,
2
,
2
,
0
,
5
,
9
,
96
,
FS_LATIN1
|
FS_LATIN2
|
FS_CYRILLIC
},
{
"Small Fonts"
,
FW_NORMAL
,
11
,
9
,
2
,
2
,
0
,
5
,
9
,
96
,
FS_LATIN1
|
FS_LATIN2
|
FS_CYRILLIC
,
LANG_ARABIC
},
{
"Small Fonts"
,
FW_NORMAL
,
11
,
9
,
2
,
2
,
0
,
4
,
10
,
96
,
FS_ARABIC
},
{
"Small Fonts"
,
FW_NORMAL
,
11
,
9
,
2
,
0
,
0
,
7
,
14
,
96
,
FS_JISJAPAN
},
{
"Small Fonts"
,
FW_NORMAL
,
3
,
2
,
1
,
0
,
0
,
1
,
2
,
120
,
FS_LATIN1
|
FS_JISJAPAN
},
...
...
@@ -783,6 +788,9 @@ static void test_bitmap_font_metrics(void)
HFONT
hfont
,
old_hfont
;
TEXTMETRIC
tm
;
INT
ret
,
i
;
WORD
system_lang_id
;
system_lang_id
=
PRIMARYLANGID
(
GetSystemDefaultLangID
());
hdc
=
CreateCompatibleDC
(
0
);
assert
(
hdc
);
...
...
@@ -818,18 +826,24 @@ static void test_bitmap_font_metrics(void)
if
(
fd
[
i
].
dpi
==
tm
.
tmDigitizedAspectX
)
{
trace
(
"found font %s, height %d charset %x dpi %d
\n
"
,
lf
.
lfFaceName
,
lf
.
lfHeight
,
lf
.
lfCharSet
,
fd
[
i
].
dpi
);
ok
(
tm
.
tmWeight
==
fd
[
i
].
weight
,
"%s(%d): tm.tmWeight %d != %d
\n
"
,
fd
[
i
].
face_name
,
fd
[
i
].
height
,
tm
.
tmWeight
,
fd
[
i
].
weight
);
ok
(
tm
.
tmHeight
==
fd
[
i
].
height
,
"%s(%d): tm.tmHeight %d != %d
\n
"
,
fd
[
i
].
face_name
,
fd
[
i
].
height
,
tm
.
tmHeight
,
fd
[
i
].
height
);
ok
(
tm
.
tmAscent
==
fd
[
i
].
ascent
,
"%s(%d): tm.tmAscent %d != %d
\n
"
,
fd
[
i
].
face_name
,
fd
[
i
].
height
,
tm
.
tmAscent
,
fd
[
i
].
ascent
);
ok
(
tm
.
tmDescent
==
fd
[
i
].
descent
,
"%s(%d): tm.tmDescent %d != %d
\n
"
,
fd
[
i
].
face_name
,
fd
[
i
].
height
,
tm
.
tmDescent
,
fd
[
i
].
descent
);
ok
(
tm
.
tmInternalLeading
==
fd
[
i
].
int_leading
,
"%s(%d): tm.tmInternalLeading %d != %d
\n
"
,
fd
[
i
].
face_name
,
fd
[
i
].
height
,
tm
.
tmInternalLeading
,
fd
[
i
].
int_leading
);
ok
(
tm
.
tmExternalLeading
==
fd
[
i
].
ext_leading
,
"%s(%d): tm.tmExternalLeading %d != %d
\n
"
,
fd
[
i
].
face_name
,
fd
[
i
].
height
,
tm
.
tmExternalLeading
,
fd
[
i
].
ext_leading
);
ok
(
tm
.
tmAveCharWidth
==
fd
[
i
].
ave_char_width
,
"%s(%d): tm.tmAveCharWidth %d != %d
\n
"
,
fd
[
i
].
face_name
,
fd
[
i
].
height
,
tm
.
tmAveCharWidth
,
fd
[
i
].
ave_char_width
);
/* Don't run the max char width test on System/ANSI_CHARSET. We have extra characters in our font
that make the max width bigger */
if
(
strcmp
(
lf
.
lfFaceName
,
"System"
)
||
lf
.
lfCharSet
!=
ANSI_CHARSET
)
ok
(
tm
.
tmMaxCharWidth
==
fd
[
i
].
max_char_width
,
"%s(%d): tm.tmMaxCharWidth %d != %d
\n
"
,
fd
[
i
].
face_name
,
fd
[
i
].
height
,
tm
.
tmMaxCharWidth
,
fd
[
i
].
max_char_width
);
if
(
fd
[
i
].
skip_lang_id
==
0
||
system_lang_id
!=
fd
[
i
].
skip_lang_id
)
{
ok
(
tm
.
tmWeight
==
fd
[
i
].
weight
,
"%s(%d): tm.tmWeight %d != %d
\n
"
,
fd
[
i
].
face_name
,
fd
[
i
].
height
,
tm
.
tmWeight
,
fd
[
i
].
weight
);
ok
(
tm
.
tmHeight
==
fd
[
i
].
height
,
"%s(%d): tm.tmHeight %d != %d
\n
"
,
fd
[
i
].
face_name
,
fd
[
i
].
height
,
tm
.
tmHeight
,
fd
[
i
].
height
);
ok
(
tm
.
tmAscent
==
fd
[
i
].
ascent
,
"%s(%d): tm.tmAscent %d != %d
\n
"
,
fd
[
i
].
face_name
,
fd
[
i
].
height
,
tm
.
tmAscent
,
fd
[
i
].
ascent
);
ok
(
tm
.
tmDescent
==
fd
[
i
].
descent
,
"%s(%d): tm.tmDescent %d != %d
\n
"
,
fd
[
i
].
face_name
,
fd
[
i
].
height
,
tm
.
tmDescent
,
fd
[
i
].
descent
);
ok
(
tm
.
tmInternalLeading
==
fd
[
i
].
int_leading
,
"%s(%d): tm.tmInternalLeading %d != %d
\n
"
,
fd
[
i
].
face_name
,
fd
[
i
].
height
,
tm
.
tmInternalLeading
,
fd
[
i
].
int_leading
);
ok
(
tm
.
tmExternalLeading
==
fd
[
i
].
ext_leading
,
"%s(%d): tm.tmExternalLeading %d != %d
\n
"
,
fd
[
i
].
face_name
,
fd
[
i
].
height
,
tm
.
tmExternalLeading
,
fd
[
i
].
ext_leading
);
ok
(
tm
.
tmAveCharWidth
==
fd
[
i
].
ave_char_width
,
"%s(%d): tm.tmAveCharWidth %d != %d
\n
"
,
fd
[
i
].
face_name
,
fd
[
i
].
height
,
tm
.
tmAveCharWidth
,
fd
[
i
].
ave_char_width
);
/* Don't run the max char width test on System/ANSI_CHARSET. We have extra characters in our font
that make the max width bigger */
if
(
strcmp
(
lf
.
lfFaceName
,
"System"
)
||
lf
.
lfCharSet
!=
ANSI_CHARSET
)
ok
(
tm
.
tmMaxCharWidth
==
fd
[
i
].
max_char_width
,
"%s(%d): tm.tmMaxCharWidth %d != %d
\n
"
,
fd
[
i
].
face_name
,
fd
[
i
].
height
,
tm
.
tmMaxCharWidth
,
fd
[
i
].
max_char_width
);
}
else
skip
(
"Skipping font metrics test for system langid 0x%x
\n
"
,
system_lang_id
);
}
SelectObject
(
hdc
,
old_hfont
);
DeleteObject
(
hfont
);
...
...
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