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
a56112c3
Commit
a56112c3
authored
Mar 15, 2021
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 15, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Implement IDWriteFontSet1::CreateFontResource().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6fea399a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
2 deletions
+18
-2
font.c
dlls/dwrite/font.c
+10
-2
font.c
dlls/dwrite/tests/font.c
+8
-0
No files found.
dlls/dwrite/font.c
View file @
a56112c3
...
...
@@ -7467,9 +7467,17 @@ static HRESULT WINAPI dwritefontset1_GetFontFaceReference(IDWriteFontSet3 *iface
static
HRESULT
WINAPI
dwritefontset1_CreateFontResource
(
IDWriteFontSet3
*
iface
,
UINT32
index
,
IDWriteFontResource
**
resource
)
{
FIXME
(
"%p, %u, %p.
\n
"
,
iface
,
index
,
resour
ce
);
struct
dwrite_fontset
*
set
=
impl_from_IDWriteFontSet3
(
ifa
ce
);
return
E_NOTIMPL
;
TRACE
(
"%p, %u, %p.
\n
"
,
iface
,
index
,
resource
);
*
resource
=
NULL
;
if
(
index
>=
set
->
count
)
return
E_INVALIDARG
;
return
IDWriteFactory7_CreateFontResource
(
set
->
factory
,
set
->
entries
[
index
]
->
file
,
set
->
entries
[
index
]
->
face_index
,
resource
);
}
static
HRESULT
WINAPI
dwritefontset1_CreateFontFace
(
IDWriteFontSet3
*
iface
,
UINT32
index
,
IDWriteFontFace5
**
fontface
)
...
...
dlls/dwrite/tests/font.c
View file @
a56112c3
...
...
@@ -10018,6 +10018,7 @@ static void test_family_font_set(void)
unsigned
int
count
,
refcount
;
IDWriteFontSet1
*
fontset
,
*
fontset2
;
IDWriteLocalizedStrings
*
values
;
IDWriteFontResource
*
resource
;
WCHAR
buffW
[
64
];
BOOL
exists
;
HRESULT
hr
;
...
...
@@ -10070,6 +10071,13 @@ static void test_family_font_set(void)
IDWriteLocalizedStrings_Release
(
values
);
}
hr
=
IDWriteFontSet1_CreateFontResource
(
fontset
,
100
,
&
resource
);
ok
(
hr
==
E_INVALIDARG
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IDWriteFontSet1_CreateFontResource
(
fontset
,
0
,
&
resource
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
IDWriteFontResource_Release
(
resource
);
IDWriteFontSet1_Release
(
fontset2
);
IDWriteFontSet1_Release
(
fontset
);
...
...
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