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
e82cf8aa
Commit
e82cf8aa
authored
May 06, 2016
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 06, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Implement IDWriteFontList1::GetFontFaceReference().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
51154acb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
3 deletions
+28
-3
font.c
dlls/dwrite/font.c
+13
-2
font.c
dlls/dwrite/tests/font.c
+15
-1
No files found.
dlls/dwrite/font.c
View file @
e82cf8aa
...
...
@@ -1695,10 +1695,21 @@ static HRESULT WINAPI dwritefontlist1_GetFontFaceReference(IDWriteFontList1 *ifa
IDWriteFontFaceReference
**
reference
)
{
struct
dwrite_fontlist
*
This
=
impl_from_IDWriteFontList1
(
iface
);
IDWriteFont3
*
font
;
HRESULT
hr
;
FIXME
(
"(%p)->(%u %p): stub
\n
"
,
This
,
index
,
reference
);
TRACE
(
"(%p)->(%u %p)
\n
"
,
This
,
index
,
reference
);
return
E_NOTIMPL
;
*
reference
=
NULL
;
hr
=
IDWriteFontList1_GetFont
(
iface
,
index
,
&
font
);
if
(
FAILED
(
hr
))
return
hr
;
hr
=
IDWriteFont3_GetFontFaceReference
(
font
,
reference
);
IDWriteFont3_Release
(
font
);
return
hr
;
}
static
const
IDWriteFontList1Vtbl
dwritefontlistvtbl
=
{
...
...
dlls/dwrite/tests/font.c
View file @
e82cf8aa
...
...
@@ -2941,7 +2941,12 @@ static void test_GetMatchingFonts(void)
hr
=
IDWriteFontList_QueryInterface
(
fontlist
,
&
IID_IDWriteFontList1
,
(
void
**
)
&
fontlist1
);
if
(
hr
==
S_OK
)
{
IDWriteFontFaceReference
*
ref
,
*
ref1
;
IDWriteFont3
*
font
;
UINT32
count
;
count
=
IDWriteFontList1_GetFontCount
(
fontlist1
);
ok
(
count
>
0
,
"got %u
\n
"
,
count
);
font
=
(
void
*
)
0xdeadbeef
;
hr
=
IDWriteFontList1_GetFont
(
fontlist1
,
~
0u
,
&
font
);
...
...
@@ -2949,7 +2954,7 @@ static void test_GetMatchingFonts(void)
ok
(
font
==
NULL
,
"got %p
\n
"
,
font
);
font
=
(
void
*
)
0xdeadbeef
;
hr
=
IDWriteFontList1_GetFont
(
fontlist1
,
IDWriteFontList1_GetFontCount
(
fontlist1
)
,
&
font
);
hr
=
IDWriteFontList1_GetFont
(
fontlist1
,
count
,
&
font
);
ok
(
hr
==
E_FAIL
,
"got 0x%08x
\n
"
,
hr
);
ok
(
font
==
NULL
,
"got %p
\n
"
,
font
);
...
...
@@ -2957,6 +2962,15 @@ static void test_GetMatchingFonts(void)
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
IDWriteFont3_Release
(
font
);
hr
=
IDWriteFontList1_GetFontFaceReference
(
fontlist1
,
0
,
&
ref
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
hr
=
IDWriteFontList1_GetFontFaceReference
(
fontlist1
,
0
,
&
ref1
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
ref
!=
ref1
,
"got %p, %p
\n
"
,
ref
,
ref1
);
IDWriteFontFaceReference_Release
(
ref1
);
IDWriteFontFaceReference_Release
(
ref
);
IDWriteFontList1_Release
(
fontlist1
);
}
else
...
...
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