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
c440d874
Commit
c440d874
authored
Jun 11, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jun 11, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Implement another GetFontFamily() variant.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
292dff58
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
4 deletions
+39
-4
font.c
dlls/dwrite/font.c
+15
-3
font.c
dlls/dwrite/tests/font.c
+24
-1
No files found.
dlls/dwrite/font.c
View file @
c440d874
...
...
@@ -3002,11 +3002,23 @@ static HRESULT WINAPI dwritefontcollection1_GetFontFamily(IDWriteFontCollection3
}
static
HRESULT
WINAPI
dwritefontcollection2_GetFontFamily
(
IDWriteFontCollection3
*
iface
,
UINT32
index
,
IDWriteFontFamily2
**
family
)
UINT32
index
,
IDWriteFontFamily2
**
ret
)
{
FIXME
(
"%p, %u, %p.
\n
"
,
iface
,
index
,
family
);
struct
dwrite_fontcollection
*
collection
=
impl_from_IDWriteFontCollection3
(
iface
);
struct
dwrite_fontfamily
*
family
;
HRESULT
hr
;
return
E_NOTIMPL
;
TRACE
(
"%p, %u, %p.
\n
"
,
iface
,
index
,
ret
);
*
ret
=
NULL
;
if
(
index
>=
collection
->
count
)
return
E_FAIL
;
if
(
SUCCEEDED
(
hr
=
create_fontfamily
(
collection
,
index
,
&
family
)))
*
ret
=
&
family
->
IDWriteFontFamily2_iface
;
return
hr
;
}
static
HRESULT
WINAPI
dwritefontcollection2_GetMatchingFonts
(
IDWriteFontCollection3
*
iface
,
...
...
dlls/dwrite/tests/font.c
View file @
c440d874
...
...
@@ -1521,14 +1521,15 @@ static void test_GetFontFamily(void)
{
IDWriteFontCollection
*
collection
,
*
collection2
;
IDWriteFontCollection
*
syscoll
;
IDWriteFontCollection2
*
coll2
;
IDWriteFontFamily
*
family
,
*
family2
;
IDWriteFontFamily1
*
family1
;
IDWriteGdiInterop
*
interop
;
IDWriteFont
*
font
,
*
font2
;
IDWriteFactory
*
factory
;
LOGFONTW
logfont
;
ULONG
ref
,
count
;
HRESULT
hr
;
ULONG
ref
;
factory
=
create_factory
();
...
...
@@ -1656,6 +1657,28 @@ if (0) /* crashes on native */
else
win_skip
(
"IDWriteFontFamily1 is not supported.
\n
"
);
/* IDWriteFontCollection2::GetFontFamily() */
if
(
SUCCEEDED
(
IDWriteFontCollection_QueryInterface
(
syscoll
,
&
IID_IDWriteFontCollection2
,
(
void
**
)
&
coll2
)))
{
IDWriteFontFamily2
*
family2
;
count
=
IDWriteFontCollection2_GetFontFamilyCount
(
coll2
);
ok
(
!!
count
,
"Unexpected family count.
\n
"
);
family2
=
(
void
*
)
0xdeadbeef
;
hr
=
IDWriteFontCollection2_GetFontFamily
(
coll2
,
count
,
&
family2
);
ok
(
hr
==
E_FAIL
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
!
family2
,
"Unexpected pointer.
\n
"
);
hr
=
IDWriteFontCollection2_GetFontFamily
(
coll2
,
0
,
&
family2
);
ok
(
hr
==
S_OK
,
"Failed to get family, hr %#x.
\n
"
,
hr
);
IDWriteFontFamily2_Release
(
family2
);
IDWriteFontCollection2_Release
(
coll2
);
}
else
win_skip
(
"IDWriteFontCollection2 is not supported.
\n
"
);
IDWriteFontCollection_Release
(
syscoll
);
IDWriteFontCollection_Release
(
collection2
);
IDWriteFontCollection_Release
(
collection
);
...
...
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