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
51154acb
Commit
51154acb
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::GetFont().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1c94bf39
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
4 deletions
+20
-4
font.c
dlls/dwrite/font.c
+10
-2
font.c
dlls/dwrite/tests/font.c
+10
-2
No files found.
dlls/dwrite/font.c
View file @
51154acb
...
...
@@ -1678,9 +1678,17 @@ static HRESULT WINAPI dwritefontlist1_GetFont(IDWriteFontList1 *iface, UINT32 in
{
struct
dwrite_fontlist
*
This
=
impl_from_IDWriteFontList1
(
iface
);
FIXME
(
"(%p)->(%u %p): stub
\n
"
,
This
,
index
,
font
);
TRACE
(
"(%p)->(%u %p)
\n
"
,
This
,
index
,
font
);
return
E_NOTIMPL
;
*
font
=
NULL
;
if
(
This
->
font_count
==
0
)
return
S_FALSE
;
if
(
index
>=
This
->
font_count
)
return
E_FAIL
;
return
create_font
(
This
->
fonts
[
index
],
This
->
family
,
font
);
}
static
HRESULT
WINAPI
dwritefontlist1_GetFontFaceReference
(
IDWriteFontList1
*
iface
,
UINT32
index
,
...
...
dlls/dwrite/tests/font.c
View file @
51154acb
...
...
@@ -2945,10 +2945,18 @@ static void test_GetMatchingFonts(void)
font
=
(
void
*
)
0xdeadbeef
;
hr
=
IDWriteFontList1_GetFont
(
fontlist1
,
~
0u
,
&
font
);
todo_wine
{
ok
(
hr
==
E_FAIL
,
"got 0x%08x
\n
"
,
hr
);
ok
(
font
==
NULL
,
"got %p
\n
"
,
font
);
}
font
=
(
void
*
)
0xdeadbeef
;
hr
=
IDWriteFontList1_GetFont
(
fontlist1
,
IDWriteFontList1_GetFontCount
(
fontlist1
),
&
font
);
ok
(
hr
==
E_FAIL
,
"got 0x%08x
\n
"
,
hr
);
ok
(
font
==
NULL
,
"got %p
\n
"
,
font
);
hr
=
IDWriteFontList1_GetFont
(
fontlist1
,
0
,
&
font
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
IDWriteFont3_Release
(
font
);
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