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
5196be77
Commit
5196be77
authored
Feb 18, 2015
by
Nikolay Sivov
Committed by
Alexandre Julliard
Feb 19, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Fix error code returned by GetFontFromFontFace().
parent
0135a596
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
3 deletions
+22
-3
font.c
dlls/dwrite/font.c
+1
-1
font.c
dlls/dwrite/tests/font.c
+21
-2
No files found.
dlls/dwrite/font.c
View file @
5196be77
...
...
@@ -1514,7 +1514,7 @@ static HRESULT WINAPI dwritefontcollection_GetFontFromFontFace(IDWriteFontCollec
}
if
(
!
found_font
)
return
E_INVALIDARG
;
return
DWRITE_E_NOFONT
;
hr
=
create_fontfamily
(
found_family
,
iface
,
&
family
);
if
(
FAILED
(
hr
))
...
...
dlls/dwrite/tests/font.c
View file @
5196be77
...
...
@@ -2028,6 +2028,7 @@ static void test_GetFontFromFontFace(void)
IDWriteFont
*
font
,
*
font2
,
*
font3
;
IDWriteFontFamily
*
family
;
IDWriteFactory
*
factory
;
IDWriteFontFile
*
file
;
HRESULT
hr
;
factory
=
create_factory
();
...
...
@@ -2064,14 +2065,32 @@ static void test_GetFontFromFontFace(void)
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
fontface2
==
fontface
,
"got %p, %p
\n
"
,
fontface2
,
fontface
);
IDWriteFontFace_Release
(
fontface2
);
IDWriteFontFace_Release
(
fontface
);
IDWriteFont_Release
(
font3
);
IDWriteFactory_Release
(
factory
);
/* fontface that wasn't created from this collection */
factory
=
create_factory
();
create_testfontfile
(
test_fontfile
);
hr
=
IDWriteFactory_CreateFontFileReference
(
factory
,
test_fontfile
,
NULL
,
&
file
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
hr
=
IDWriteFactory_CreateFontFace
(
factory
,
DWRITE_FONT_FACE_TYPE_TRUETYPE
,
1
,
&
file
,
0
,
DWRITE_FONT_SIMULATIONS_NONE
,
&
fontface
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
IDWriteFontFile_Release
(
file
);
hr
=
IDWriteFontCollection_GetFontFromFontFace
(
collection
,
fontface
,
&
font3
);
ok
(
hr
==
DWRITE_E_NOFONT
,
"got 0x%08x
\n
"
,
hr
);
ok
(
font3
==
NULL
,
"got %p
\n
"
,
font3
);
IDWriteFontFace_Release
(
fontface
);
IDWriteFont_Release
(
font
);
IDWriteFont_Release
(
font2
);
IDWriteFont_Release
(
font3
);
IDWriteFontFace_Release
(
fontface
);
IDWriteFontFamily_Release
(
family
);
IDWriteFontCollection_Release
(
collection
);
IDWriteFactory_Release
(
factory
);
DeleteFileW
(
test_fontfile
);
}
static
IDWriteFont
*
get_tahoma_instance
(
IDWriteFactory
*
factory
,
DWRITE_FONT_STYLE
style
)
...
...
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