Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lorenzo Ferrillo
wine
Commits
566d455b
Commit
566d455b
authored
14 years ago
by
Ge van Geldorp
Committed by
Alexandre Julliard
14 years ago
Browse files
Options
Downloads
Patches
Plain Diff
gdi32/tests: Fix font tests on Arabic machines.
parent
5b1d4617
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/gdi32/tests/font.c
+31
-17
31 additions, 17 deletions
dlls/gdi32/tests/font.c
with
31 additions
and
17 deletions
dlls/gdi32/tests/font.c
+
31
−
17
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
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment