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
13174a2f
Commit
13174a2f
authored
Sep 15, 2023
by
Jeff Smith
Committed by
Alexandre Julliard
Sep 19, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus/tests: Test GdipCreateFont character set initialization.
parent
a240d380
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
73 additions
and
0 deletions
+73
-0
font.c
dlls/gdiplus/tests/font.c
+73
-0
No files found.
dlls/gdiplus/tests/font.c
View file @
13174a2f
...
...
@@ -191,6 +191,78 @@ static void test_createfont(void)
GdipDeleteFontFamily
(
fontfamily
);
}
static
void
test_createfont_charset
(
void
)
{
GpFontFamily
*
fontfamily
=
NULL
;
GpGraphics
*
graphics
;
GpFont
*
font
=
NULL
;
GpStatus
stat
;
LOGFONTW
lf
;
HDC
hdc
;
UINT
i
;
static
const
struct
{
LPCWSTR
family_name
;
BYTE
char_set
;
BOOL
todo
;
}
td
[]
=
{
{
L"Tahoma"
,
ANSI_CHARSET
},
{
L"Symbol"
,
SYMBOL_CHARSET
},
{
L"Marlett"
,
SYMBOL_CHARSET
,
TRUE
},
{
L"Wingdings"
,
SYMBOL_CHARSET
,
TRUE
},
};
hdc
=
CreateCompatibleDC
(
0
);
stat
=
GdipCreateFromHDC
(
hdc
,
&
graphics
);
expect
(
Ok
,
stat
);
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
td
);
i
++
)
{
winetest_push_context
(
"%u"
,
i
);
stat
=
GdipCreateFontFamilyFromName
(
td
[
i
].
family_name
,
NULL
,
&
fontfamily
);
expect
(
Ok
,
stat
);
stat
=
GdipCreateFont
(
fontfamily
,
30
,
FontStyleRegular
,
UnitPoint
,
&
font
);
expect
(
Ok
,
stat
);
stat
=
GdipGetLogFontW
(
font
,
graphics
,
&
lf
);
expect
(
Ok
,
stat
);
if
(
lstrcmpiW
(
lf
.
lfFaceName
,
td
[
i
].
family_name
)
!=
0
)
{
skip
(
"%s not installed
\n
"
,
wine_dbgstr_w
(
td
[
i
].
family_name
));
}
else
{
ok
(
lf
.
lfHeight
<
0
,
"Expected negative height, got %ld
\n
"
,
lf
.
lfHeight
);
expect
(
0
,
lf
.
lfWidth
);
expect
(
0
,
lf
.
lfEscapement
);
expect
(
0
,
lf
.
lfOrientation
);
ok
((
lf
.
lfWeight
>=
100
)
&&
(
lf
.
lfWeight
<=
900
),
"Expected weight to be set
\n
"
);
expect
(
0
,
lf
.
lfItalic
);
expect
(
0
,
lf
.
lfUnderline
);
expect
(
0
,
lf
.
lfStrikeOut
);
todo_wine_if
(
td
[
i
].
todo
)
ok
(
td
[
i
].
char_set
==
lf
.
lfCharSet
||
(
td
[
i
].
char_set
==
ANSI_CHARSET
&&
lf
.
lfCharSet
==
GetTextCharset
(
hdc
)),
"got %#x
\n
"
,
lf
.
lfCharSet
);
expect
(
0
,
lf
.
lfOutPrecision
);
expect
(
0
,
lf
.
lfClipPrecision
);
expect
(
0
,
lf
.
lfQuality
);
expect
(
0
,
lf
.
lfPitchAndFamily
);
}
GdipDeleteFont
(
font
);
GdipDeleteFontFamily
(
fontfamily
);
winetest_pop_context
();
}
GdipDeleteGraphics
(
graphics
);
DeleteDC
(
hdc
);
}
static
void
test_logfont
(
void
)
{
LOGFONTA
lfa
,
lfa2
;
...
...
@@ -1479,6 +1551,7 @@ START_TEST(font)
test_font_substitution
();
test_font_metrics
();
test_createfont
();
test_createfont_charset
();
test_logfont
();
test_fontfamily
();
test_fontfamily_properties
();
...
...
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