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
163b046e
Commit
163b046e
authored
Apr 23, 2009
by
Paul Vriens
Committed by
Alexandre Julliard
Apr 24, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus/tests: Fix test failures on Win98 by using A-functions.
parent
40f812c1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
44 deletions
+43
-44
font.c
dlls/gdiplus/tests/font.c
+43
-44
No files found.
dlls/gdiplus/tests/font.c
View file @
163b046e
...
...
@@ -97,7 +97,7 @@ static void test_createfont(void)
static
void
test_logfont
(
void
)
{
LOGFONT
W
lfw
,
lfw
2
;
LOGFONT
A
lfa
,
lfa
2
;
GpFont
*
font
;
GpStatus
stat
;
GpGraphics
*
graphics
;
...
...
@@ -105,70 +105,69 @@ static void test_logfont(void)
INT
style
;
GdipCreateFromHDC
(
hdc
,
&
graphics
);
memset
(
&
lf
w
,
0
,
sizeof
(
LOGFONTW
));
memset
(
&
lf
w2
,
0xff
,
sizeof
(
LOGFONTW
));
memset
(
&
lf
a
,
0
,
sizeof
(
LOGFONTA
));
memset
(
&
lf
a2
,
0xff
,
sizeof
(
LOGFONTA
));
/* empty FaceName */
lfw
.
lfFaceName
[
0
]
=
0
;
stat
=
GdipCreateFontFromLogfontW
(
hdc
,
&
lfw
,
&
font
);
lfa
.
lfFaceName
[
0
]
=
0
;
stat
=
GdipCreateFontFromLogfontA
(
hdc
,
&
lfa
,
&
font
);
expect
(
NotTrueTypeFont
,
stat
);
memcpy
(
&
lfw
.
lfFaceName
,
arial
,
6
*
sizeof
(
WCHAR
)
);
lstrcpyA
(
lfa
.
lfFaceName
,
"Arial"
);
stat
=
GdipCreateFontFromLogfont
W
(
hdc
,
&
lfw
,
&
font
);
stat
=
GdipCreateFontFromLogfont
A
(
hdc
,
&
lfa
,
&
font
);
if
(
stat
==
FileNotFound
)
{
skip
(
"Arial not installed.
\n
"
);
return
;
}
expect
(
Ok
,
stat
);
stat
=
GdipGetLogFont
W
(
font
,
graphics
,
&
lfw
2
);
stat
=
GdipGetLogFont
A
(
font
,
graphics
,
&
lfa
2
);
expect
(
Ok
,
stat
);
ok
(
lf
w
2
.
lfHeight
<
0
,
"Expected negative height
\n
"
);
expect
(
0
,
lf
w
2
.
lfWidth
);
expect
(
0
,
lf
w
2
.
lfEscapement
);
expect
(
0
,
lf
w
2
.
lfOrientation
);
ok
((
lf
w2
.
lfWeight
>=
100
)
&&
(
lfw
2
.
lfWeight
<=
900
),
"Expected weight to be set
\n
"
);
expect
(
0
,
lf
w
2
.
lfItalic
);
expect
(
0
,
lf
w
2
.
lfUnderline
);
expect
(
0
,
lf
w
2
.
lfStrikeOut
);
expect
(
GetTextCharset
(
hdc
),
lf
w
2
.
lfCharSet
);
expect
(
0
,
lf
w
2
.
lfOutPrecision
);
expect
(
0
,
lf
w
2
.
lfClipPrecision
);
expect
(
0
,
lf
w
2
.
lfQuality
);
expect
(
0
,
lf
w
2
.
lfPitchAndFamily
);
ok
(
lf
a
2
.
lfHeight
<
0
,
"Expected negative height
\n
"
);
expect
(
0
,
lf
a
2
.
lfWidth
);
expect
(
0
,
lf
a
2
.
lfEscapement
);
expect
(
0
,
lf
a
2
.
lfOrientation
);
ok
((
lf
a2
.
lfWeight
>=
100
)
&&
(
lfa
2
.
lfWeight
<=
900
),
"Expected weight to be set
\n
"
);
expect
(
0
,
lf
a
2
.
lfItalic
);
expect
(
0
,
lf
a
2
.
lfUnderline
);
expect
(
0
,
lf
a
2
.
lfStrikeOut
);
expect
(
GetTextCharset
(
hdc
),
lf
a
2
.
lfCharSet
);
expect
(
0
,
lf
a
2
.
lfOutPrecision
);
expect
(
0
,
lf
a
2
.
lfClipPrecision
);
expect
(
0
,
lf
a
2
.
lfQuality
);
expect
(
0
,
lf
a
2
.
lfPitchAndFamily
);
GdipDeleteFont
(
font
);
memset
(
&
lf
w
,
0
,
sizeof
(
LOGFONTW
));
lf
w
.
lfHeight
=
25
;
lf
w
.
lfWidth
=
25
;
lf
w
.
lfEscapement
=
lfw
.
lfOrientation
=
50
;
lf
w
.
lfItalic
=
lfw
.
lfUnderline
=
lfw
.
lfStrikeOut
=
TRUE
;
memset
(
&
lf
a
,
0
,
sizeof
(
LOGFONTA
));
lf
a
.
lfHeight
=
25
;
lf
a
.
lfWidth
=
25
;
lf
a
.
lfEscapement
=
lfa
.
lfOrientation
=
50
;
lf
a
.
lfItalic
=
lfa
.
lfUnderline
=
lfa
.
lfStrikeOut
=
TRUE
;
memset
(
&
lf
w2
,
0xff
,
sizeof
(
LOGFONTW
));
memcpy
(
&
lfw
.
lfFaceName
,
arial
,
6
*
sizeof
(
WCHAR
)
);
memset
(
&
lf
a2
,
0xff
,
sizeof
(
LOGFONTA
));
lstrcpyA
(
lfa
.
lfFaceName
,
"Arial"
);
stat
=
GdipCreateFontFromLogfont
W
(
hdc
,
&
lfw
,
&
font
);
stat
=
GdipCreateFontFromLogfont
A
(
hdc
,
&
lfa
,
&
font
);
expect
(
Ok
,
stat
);
stat
=
GdipGetLogFont
W
(
font
,
graphics
,
&
lfw
2
);
stat
=
GdipGetLogFont
A
(
font
,
graphics
,
&
lfa
2
);
expect
(
Ok
,
stat
);
ok
(
lf
w
2
.
lfHeight
<
0
,
"Expected negative height
\n
"
);
expect
(
0
,
lf
w
2
.
lfWidth
);
expect
(
0
,
lf
w
2
.
lfEscapement
);
expect
(
0
,
lf
w
2
.
lfOrientation
);
ok
((
lf
w2
.
lfWeight
>=
100
)
&&
(
lfw
2
.
lfWeight
<=
900
),
"Expected weight to be set
\n
"
);
expect
(
TRUE
,
lf
w
2
.
lfItalic
);
expect
(
TRUE
,
lf
w
2
.
lfUnderline
);
expect
(
TRUE
,
lf
w
2
.
lfStrikeOut
);
expect
(
GetTextCharset
(
hdc
),
lf
w
2
.
lfCharSet
);
expect
(
0
,
lf
w
2
.
lfOutPrecision
);
expect
(
0
,
lf
w
2
.
lfClipPrecision
);
expect
(
0
,
lf
w
2
.
lfQuality
);
expect
(
0
,
lf
w
2
.
lfPitchAndFamily
);
ok
(
lf
a
2
.
lfHeight
<
0
,
"Expected negative height
\n
"
);
expect
(
0
,
lf
a
2
.
lfWidth
);
expect
(
0
,
lf
a
2
.
lfEscapement
);
expect
(
0
,
lf
a
2
.
lfOrientation
);
ok
((
lf
a2
.
lfWeight
>=
100
)
&&
(
lfa
2
.
lfWeight
<=
900
),
"Expected weight to be set
\n
"
);
expect
(
TRUE
,
lf
a
2
.
lfItalic
);
expect
(
TRUE
,
lf
a
2
.
lfUnderline
);
expect
(
TRUE
,
lf
a
2
.
lfStrikeOut
);
expect
(
GetTextCharset
(
hdc
),
lf
a
2
.
lfCharSet
);
expect
(
0
,
lf
a
2
.
lfOutPrecision
);
expect
(
0
,
lf
a
2
.
lfClipPrecision
);
expect
(
0
,
lf
a
2
.
lfQuality
);
expect
(
0
,
lf
a
2
.
lfPitchAndFamily
);
stat
=
GdipGetFontStyle
(
font
,
&
style
);
expect
(
Ok
,
stat
);
...
...
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