Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
fe3d38d1
Commit
fe3d38d1
authored
Jun 21, 2008
by
Adam Petaccia
Committed by
Alexandre Julliard
Jun 25, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Tests for new font functions.
parent
082529b1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
0 deletions
+41
-0
font.c
dlls/gdiplus/tests/font.c
+41
-0
No files found.
dlls/gdiplus/tests/font.c
View file @
fe3d38d1
...
...
@@ -38,6 +38,46 @@ static const char *debugstr_w(LPCWSTR str)
return
buf
;
}
static
void
test_createfont
(
void
)
{
GpFontFamily
*
fontfamily
=
NULL
;
GpFont
*
font
=
NULL
;
GpStatus
stat
;
Unit
unit
;
UINT
i
;
REAL
size
;
stat
=
GdipCreateFontFamilyFromName
(
nonexistant
,
NULL
,
&
fontfamily
);
expect
(
FontFamilyNotFound
,
stat
);
stat
=
GdipDeleteFont
(
font
);
expect
(
InvalidParameter
,
stat
);
stat
=
GdipCreateFontFamilyFromName
(
arial
,
NULL
,
&
fontfamily
);
expect
(
Ok
,
stat
);
stat
=
GdipCreateFont
(
fontfamily
,
12
,
FontStyleRegular
,
UnitPoint
,
&
font
);
expect
(
Ok
,
stat
);
stat
=
GdipGetFontUnit
(
font
,
&
unit
);
expect
(
Ok
,
stat
);
expect
(
UnitPoint
,
unit
);
/* Test to see if returned size is based on unit (its not) */
GdipGetFontSize
(
font
,
&
size
);
ok
(
size
==
12
,
"Expected 12, got %f
\n
"
,
size
);
GdipDeleteFont
(
font
);
/* Make sure everything is converted correctly for all Units */
for
(
i
=
UnitWorld
;
i
<=
UnitMillimeter
;
i
++
)
{
if
(
i
==
UnitDisplay
)
continue
;
/* Crashes WindowsXP, wtf? */
GdipCreateFont
(
fontfamily
,
24
,
FontStyleRegular
,
i
,
&
font
);
GdipGetFontSize
(
font
,
&
size
);
ok
(
size
==
24
,
"Expected 24, got %f (with unit: %d)
\n
"
,
size
,
i
);
GdipGetFontUnit
(
font
,
&
unit
);
expect
(
i
,
unit
);
GdipDeleteFont
(
font
);
}
}
static
void
test_logfont
(
void
)
{
LOGFONTW
lfw
,
lfw2
;
...
...
@@ -207,6 +247,7 @@ START_TEST(font)
GdiplusStartup
(
&
gdiplusToken
,
&
gdiplusStartupInput
,
NULL
);
test_createfont
();
test_logfont
();
test_fontfamily
();
test_getgenerics
();
...
...
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