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
fe848b26
Commit
fe848b26
authored
Sep 04, 2015
by
Nikolay Sivov
Committed by
Alexandre Julliard
Sep 04, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Make CreateFontFace() fail with DWRITE_E_FILEFORMAT for supported types…
dwrite: Make CreateFontFace() fail with DWRITE_E_FILEFORMAT for supported types in case of type mismatch.
parent
0aca2d7d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
main.c
dlls/dwrite/main.c
+4
-1
font.c
dlls/dwrite/tests/font.c
+1
-2
No files found.
dlls/dwrite/main.c
View file @
fe848b26
...
...
@@ -818,9 +818,12 @@ static HRESULT WINAPI dwritefactory_CreateFontFace(IDWriteFactory2 *iface,
if
(
FAILED
(
hr
))
return
hr
;
if
(
!
is_supported
||
(
face_type
!=
req_facetype
)
)
if
(
!
is_supported
)
return
E_FAIL
;
if
(
face_type
!=
req_facetype
)
return
DWRITE_E_FILEFORMAT
;
hr
=
IDWriteFontFile_GetReferenceKey
(
*
font_files
,
&
key
,
&
key_size
);
if
(
FAILED
(
hr
))
return
hr
;
...
...
dlls/dwrite/tests/font.c
View file @
fe848b26
...
...
@@ -1307,12 +1307,11 @@ if (0) /* crashes on native */
/* try mismatching face type, the one that's not supported */
hr
=
IDWriteFactory_CreateFontFace
(
factory
,
DWRITE_FONT_FACE_TYPE_CFF
,
1
,
&
file
,
0
,
DWRITE_FONT_SIMULATIONS_NONE
,
&
fontface
);
todo_wine
ok
(
hr
==
DWRITE_E_FILEFORMAT
,
"got 0x%08x
\n
"
,
hr
);
hr
=
IDWriteFactory_CreateFontFace
(
factory
,
DWRITE_FONT_FACE_TYPE_TRUETYPE_COLLECTION
,
1
,
&
file
,
0
,
DWRITE_FONT_SIMULATIONS_NONE
,
&
fontface
);
ok
(
hr
==
E_FAIL
,
"got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
DWRITE_E_FILEFORMAT
||
broken
(
hr
==
E_FAIL
)
/* < win10 */
,
"got 0x%08x
\n
"
,
hr
);
hr
=
IDWriteFactory_CreateFontFace
(
factory
,
DWRITE_FONT_FACE_TYPE_RAW_CFF
,
1
,
&
file
,
0
,
DWRITE_FONT_SIMULATIONS_NONE
,
&
fontface
);
todo_wine
...
...
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