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
7540fa5a
Commit
7540fa5a
authored
Aug 06, 2015
by
Nikolay Sivov
Committed by
Alexandre Julliard
Aug 07, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Properly initialize LOGFONT returned from ConvertFontToLOGFONT().
parent
864105b6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
1 deletion
+35
-1
gdiinterop.c
dlls/dwrite/gdiinterop.c
+2
-0
font.c
dlls/dwrite/tests/font.c
+33
-1
No files found.
dlls/dwrite/gdiinterop.c
View file @
7540fa5a
...
...
@@ -504,6 +504,8 @@ static HRESULT WINAPI gdiinterop_ConvertFontToLOGFONT(IDWriteGdiInterop *iface,
*
is_systemfont
=
FALSE
;
memset
(
logfont
,
0
,
sizeof
(
*
logfont
));
if
(
!
font
)
return
E_INVALIDARG
;
...
...
dlls/dwrite/tests/font.c
View file @
7540fa5a
...
...
@@ -2731,16 +2731,48 @@ if (0) { /* crashes on native */
IDWriteGdiInterop_ConvertFontToLOGFONT
(
interop
,
NULL
,
&
logfont
,
NULL
);
IDWriteGdiInterop_ConvertFontToLOGFONT
(
interop
,
font
,
NULL
,
&
system
);
}
memset
(
&
logfont
,
0xcc
,
sizeof
(
logfont
));
system
=
TRUE
;
hr
=
IDWriteGdiInterop_ConvertFontToLOGFONT
(
interop
,
NULL
,
&
logfont
,
&
system
);
ok
(
hr
==
E_INVALIDARG
,
"got 0x%08x
\n
"
,
hr
);
ok
(
!
system
,
"got %d
\n
"
,
system
);
ok
(
logfont
.
lfFaceName
[
0
]
==
0
,
"got face name %s
\n
"
,
wine_dbgstr_w
(
logfont
.
lfFaceName
));
system
=
FALSE
;
memset
(
&
logfont
,
0
,
sizeof
(
logfont
));
logfont
.
lfHeight
=
10
;
logfont
.
lfWidth
=
11
;
logfont
.
lfEscapement
=
10
;
logfont
.
lfOrientation
=
10
;
logfont
.
lfWeight
=
0
;
logfont
.
lfItalic
=
1
;
logfont
.
lfUnderline
=
1
;
logfont
.
lfStrikeOut
=
1
;
logfont
.
lfCharSet
=
0
;
logfont
.
lfOutPrecision
=
0
;
logfont
.
lfClipPrecision
=
0
;
logfont
.
lfQuality
=
0
;
logfont
.
lfPitchAndFamily
=
0
;
logfont
.
lfFaceName
[
0
]
=
0
;
hr
=
IDWriteGdiInterop_ConvertFontToLOGFONT
(
interop
,
font
,
&
logfont
,
&
system
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
system
,
"got %d
\n
"
,
system
);
ok
(
logfont
.
lfHeight
==
0
,
"got %d
\n
"
,
logfont
.
lfHeight
);
ok
(
logfont
.
lfWidth
==
0
,
"got %d
\n
"
,
logfont
.
lfWidth
);
ok
(
logfont
.
lfEscapement
==
0
,
"got %d
\n
"
,
logfont
.
lfEscapement
);
ok
(
logfont
.
lfOrientation
==
0
,
"got %d
\n
"
,
logfont
.
lfOrientation
);
ok
(
logfont
.
lfWeight
>
0
,
"got %d
\n
"
,
logfont
.
lfWeight
);
ok
(
logfont
.
lfItalic
==
0
,
"got %d
\n
"
,
logfont
.
lfItalic
);
ok
(
logfont
.
lfUnderline
==
0
,
"got %d
\n
"
,
logfont
.
lfUnderline
);
ok
(
logfont
.
lfStrikeOut
==
0
,
"got %d
\n
"
,
logfont
.
lfStrikeOut
);
ok
(
logfont
.
lfCharSet
==
DEFAULT_CHARSET
,
"got %d
\n
"
,
logfont
.
lfCharSet
);
ok
(
logfont
.
lfOutPrecision
==
OUT_OUTLINE_PRECIS
,
"got %d
\n
"
,
logfont
.
lfOutPrecision
);
ok
(
logfont
.
lfClipPrecision
==
0
,
"got %d
\n
"
,
logfont
.
lfClipPrecision
);
ok
(
logfont
.
lfQuality
==
0
,
"got %d
\n
"
,
logfont
.
lfQuality
);
ok
(
logfont
.
lfPitchAndFamily
==
0
,
"got %d
\n
"
,
logfont
.
lfPitchAndFamily
);
ok
(
logfont
.
lfFaceName
[
0
]
!=
0
,
"got face name %s
\n
"
,
wine_dbgstr_w
(
logfont
.
lfFaceName
));
IDWriteFactory_Release
(
factory2
);
...
...
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