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
b93d9d93
Commit
b93d9d93
authored
Aug 15, 2017
by
Nikolay Sivov
Committed by
Alexandre Julliard
Aug 20, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Added a helper to check for supported characters.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
fb5079d8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
12 deletions
+16
-12
font.c
dlls/dwrite/font.c
+16
-12
No files found.
dlls/dwrite/font.c
View file @
b93d9d93
...
@@ -1192,7 +1192,7 @@ static BOOL WINAPI dwritefontface3_HasCharacter(IDWriteFontFace4 *iface, UINT32
...
@@ -1192,7 +1192,7 @@ static BOOL WINAPI dwritefontface3_HasCharacter(IDWriteFontFace4 *iface, UINT32
struct
dwrite_fontface
*
This
=
impl_from_IDWriteFontFace4
(
iface
);
struct
dwrite_fontface
*
This
=
impl_from_IDWriteFontFace4
(
iface
);
UINT16
index
;
UINT16
index
;
TRACE
(
"(%p)->(
0x%08
x)
\n
"
,
This
,
ch
);
TRACE
(
"(%p)->(
%#
x)
\n
"
,
This
,
ch
);
index
=
0
;
index
=
0
;
if
(
FAILED
(
fontface_get_glyphs
(
This
,
&
ch
,
1
,
&
index
)))
if
(
FAILED
(
fontface_get_glyphs
(
This
,
&
ch
,
1
,
&
index
)))
...
@@ -1566,31 +1566,37 @@ static void WINAPI dwritefont_GetMetrics(IDWriteFont3 *iface, DWRITE_FONT_METRIC
...
@@ -1566,31 +1566,37 @@ static void WINAPI dwritefont_GetMetrics(IDWriteFont3 *iface, DWRITE_FONT_METRIC
memcpy
(
metrics
,
&
This
->
data
->
metrics
,
sizeof
(
*
metrics
));
memcpy
(
metrics
,
&
This
->
data
->
metrics
,
sizeof
(
*
metrics
));
}
}
static
HRESULT
WINAPI
dwritefont_HasCharacter
(
IDWriteFont3
*
iface
,
UINT32
value
,
BOOL
*
exists
)
static
HRESULT
font_has_character
(
struct
dwrite_font
*
font
,
UINT32
ch
,
BOOL
*
exists
)
{
{
struct
dwrite_font
*
This
=
impl_from_IDWriteFont3
(
iface
);
IDWriteFontFace4
*
fontface
;
IDWriteFontFace4
*
fontface
;
UINT16
index
;
UINT16
index
;
HRESULT
hr
;
HRESULT
hr
;
TRACE
(
"(%p)->(0x%08x %p)
\n
"
,
This
,
value
,
exists
);
*
exists
=
FALSE
;
*
exists
=
FALSE
;
hr
=
get_fontface_from_font
(
This
,
&
fontface
);
hr
=
get_fontface_from_font
(
font
,
&
fontface
);
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
))
return
hr
;
return
hr
;
index
=
0
;
index
=
0
;
hr
=
IDWriteFontFace4_GetGlyphIndices
(
fontface
,
&
value
,
1
,
&
index
);
hr
=
IDWriteFontFace4_GetGlyphIndices
(
fontface
,
&
ch
,
1
,
&
index
);
IDWriteFontFace4_Release
(
fontface
);
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
))
return
hr
;
return
hr
;
IDWriteFontFace4_Release
(
fontface
);
*
exists
=
index
!=
0
;
*
exists
=
index
!=
0
;
return
S_OK
;
return
S_OK
;
}
}
static
HRESULT
WINAPI
dwritefont_HasCharacter
(
IDWriteFont3
*
iface
,
UINT32
ch
,
BOOL
*
exists
)
{
struct
dwrite_font
*
This
=
impl_from_IDWriteFont3
(
iface
);
TRACE
(
"(%p)->(%#x %p)
\n
"
,
This
,
ch
,
exists
);
return
font_has_character
(
This
,
ch
,
exists
);
}
static
HRESULT
WINAPI
dwritefont_CreateFontFace
(
IDWriteFont3
*
iface
,
IDWriteFontFace
**
fontface
)
static
HRESULT
WINAPI
dwritefont_CreateFontFace
(
IDWriteFont3
*
iface
,
IDWriteFontFace
**
fontface
)
{
{
struct
dwrite_font
*
This
=
impl_from_IDWriteFont3
(
iface
);
struct
dwrite_font
*
This
=
impl_from_IDWriteFont3
(
iface
);
...
@@ -1694,13 +1700,11 @@ static HRESULT WINAPI dwritefont3_GetFontFaceReference(IDWriteFont3 *iface, IDWr
...
@@ -1694,13 +1700,11 @@ static HRESULT WINAPI dwritefont3_GetFontFaceReference(IDWriteFont3 *iface, IDWr
static
BOOL
WINAPI
dwritefont3_HasCharacter
(
IDWriteFont3
*
iface
,
UINT32
ch
)
static
BOOL
WINAPI
dwritefont3_HasCharacter
(
IDWriteFont3
*
iface
,
UINT32
ch
)
{
{
struct
dwrite_font
*
This
=
impl_from_IDWriteFont3
(
iface
);
struct
dwrite_font
*
This
=
impl_from_IDWriteFont3
(
iface
);
HRESULT
hr
;
BOOL
ret
;
BOOL
ret
;
TRACE
(
"(%p)->(
0x%
x)
\n
"
,
This
,
ch
);
TRACE
(
"(%p)->(
%#
x)
\n
"
,
This
,
ch
);
hr
=
IDWriteFont_HasCharacter
((
IDWriteFont
*
)
iface
,
ch
,
&
ret
);
return
font_has_character
(
This
,
ch
,
&
ret
)
==
S_OK
&&
ret
;
return
hr
==
S_OK
&&
ret
;
}
}
static
DWRITE_LOCALITY
WINAPI
dwritefont3_GetLocality
(
IDWriteFont3
*
iface
)
static
DWRITE_LOCALITY
WINAPI
dwritefont3_GetLocality
(
IDWriteFont3
*
iface
)
...
...
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