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
2bc442aa
Commit
2bc442aa
authored
Mar 12, 2021
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 12, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Add a helper to return font list item.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8010ede2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
11 deletions
+17
-11
font.c
dlls/dwrite/font.c
+17
-11
No files found.
dlls/dwrite/font.c
View file @
2bc442aa
...
...
@@ -2336,12 +2336,9 @@ static DWRITE_LOCALITY WINAPI dwritefontlist1_GetFontLocality(IDWriteFontList2 *
return
DWRITE_LOCALITY_LOCAL
;
}
static
HRESULT
WINAPI
dwritefontlist1_GetFont
(
IDWriteFontList2
*
iface
,
UINT32
index
,
IDWriteFont3
**
font
)
static
HRESULT
fontlist_get_font
(
const
struct
dwrite_fontlist
*
fontlist
,
unsigned
int
index
,
IDWriteFont3
**
font
)
{
struct
dwrite_fontlist
*
fontlist
=
impl_from_IDWriteFontList2
(
iface
);
TRACE
(
"%p, %u, %p.
\n
"
,
iface
,
index
,
font
);
*
font
=
NULL
;
if
(
fontlist
->
font_count
==
0
)
...
...
@@ -2353,9 +2350,19 @@ static HRESULT WINAPI dwritefontlist1_GetFont(IDWriteFontList2 *iface, UINT32 in
return
create_font
(
fontlist
->
family
,
index
,
font
);
}
static
HRESULT
WINAPI
dwritefontlist1_GetFont
(
IDWriteFontList2
*
iface
,
UINT32
index
,
IDWriteFont3
**
font
)
{
struct
dwrite_fontlist
*
fontlist
=
impl_from_IDWriteFontList2
(
iface
);
TRACE
(
"%p, %u, %p.
\n
"
,
iface
,
index
,
font
);
return
fontlist_get_font
(
fontlist
,
index
,
font
);
}
static
HRESULT
WINAPI
dwritefontlist1_GetFontFaceReference
(
IDWriteFontList2
*
iface
,
UINT32
index
,
IDWriteFontFaceReference
**
reference
)
{
struct
dwrite_fontlist
*
fontlist
=
impl_from_IDWriteFontList2
(
iface
);
IDWriteFont3
*
font
;
HRESULT
hr
;
...
...
@@ -2363,12 +2370,11 @@ static HRESULT WINAPI dwritefontlist1_GetFontFaceReference(IDWriteFontList2 *ifa
*
reference
=
NULL
;
hr
=
IDWriteFontList2_GetFont
(
iface
,
index
,
&
font
);
if
(
FAILED
(
hr
))
return
hr
;
hr
=
IDWriteFont3_GetFontFaceReference
(
font
,
reference
);
IDWriteFont3_Release
(
font
);
if
(
SUCCEEDED
(
hr
=
fontlist_get_font
(
fontlist
,
index
,
&
font
)))
{
hr
=
IDWriteFont3_GetFontFaceReference
(
font
,
reference
);
IDWriteFont3_Release
(
font
);
}
return
hr
;
}
...
...
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