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
10431905
Commit
10431905
authored
Oct 22, 2012
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 23, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Implement GetFontFamily() for system font collection.
parent
a30faec1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
2 deletions
+19
-2
font.c
dlls/dwrite/font.c
+12
-2
font.c
dlls/dwrite/tests/font.c
+7
-0
No files found.
dlls/dwrite/font.c
View file @
10431905
...
...
@@ -161,6 +161,8 @@ struct dwrite_fontface {
LONG
ref
;
};
static
HRESULT
create_fontfamily
(
const
WCHAR
*
familyname
,
IDWriteFontFamily
**
family
);
static
inline
struct
dwrite_fontface
*
impl_from_IDWriteFontFace
(
IDWriteFontFace
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
dwrite_fontface
,
IDWriteFontFace_iface
);
...
...
@@ -666,8 +668,16 @@ static UINT32 WINAPI dwritefontcollection_GetFontFamilyCount(IDWriteFontCollecti
static
HRESULT
WINAPI
dwritefontcollection_GetFontFamily
(
IDWriteFontCollection
*
iface
,
UINT32
index
,
IDWriteFontFamily
**
family
)
{
struct
dwrite_fontcollection
*
This
=
impl_from_IDWriteFontCollection
(
iface
);
FIXME
(
"(%p)->(%u %p): stub
\n
"
,
This
,
index
,
family
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%u %p)
\n
"
,
This
,
index
,
family
);
if
(
index
>=
This
->
count
)
{
*
family
=
NULL
;
return
E_FAIL
;
}
return
create_fontfamily
(
This
->
families
[
index
],
family
);
}
static
HRESULT
WINAPI
dwritefontcollection_FindFamilyName
(
IDWriteFontCollection
*
iface
,
const
WCHAR
*
name
,
UINT32
*
index
,
BOOL
*
exists
)
...
...
dlls/dwrite/tests/font.c
View file @
10431905
...
...
@@ -526,6 +526,7 @@ todo_wine
static
void
test_system_fontcollection
(
void
)
{
IDWriteFontCollection
*
collection
,
*
coll2
;
IDWriteFontFamily
*
family
;
HRESULT
hr
;
UINT32
i
;
BOOL
ret
;
...
...
@@ -546,6 +547,12 @@ static void test_system_fontcollection(void)
i
=
IDWriteFontCollection_GetFontFamilyCount
(
collection
);
ok
(
i
,
"got %u
\n
"
,
i
);
/* invalid index */
family
=
(
void
*
)
0xdeadbeef
;
hr
=
IDWriteFontCollection_GetFontFamily
(
collection
,
i
,
&
family
);
ok
(
hr
==
E_FAIL
,
"got 0x%08x
\n
"
,
hr
);
ok
(
family
==
NULL
,
"got %p
\n
"
,
family
);
ret
=
FALSE
;
i
=
(
UINT32
)
-
1
;
hr
=
IDWriteFontCollection_FindFamilyName
(
collection
,
tahomaW
,
&
i
,
&
ret
);
...
...
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