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
9b46e19a
Commit
9b46e19a
authored
Oct 16, 2014
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 16, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Implement HasCharacter().
parent
8f34bee2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
2 deletions
+31
-2
font.c
dlls/dwrite/font.c
+20
-2
font.c
dlls/dwrite/tests/font.c
+11
-0
No files found.
dlls/dwrite/font.c
View file @
9b46e19a
...
...
@@ -835,8 +835,26 @@ static void WINAPI dwritefont_GetMetrics(IDWriteFont2 *iface, DWRITE_FONT_METRIC
static
HRESULT
WINAPI
dwritefont_HasCharacter
(
IDWriteFont2
*
iface
,
UINT32
value
,
BOOL
*
exists
)
{
struct
dwrite_font
*
This
=
impl_from_IDWriteFont2
(
iface
);
FIXME
(
"(%p)->(0x%08x %p): stub
\n
"
,
This
,
value
,
exists
);
return
E_NOTIMPL
;
IDWriteFontFace
*
fontface
;
UINT16
index
;
HRESULT
hr
;
TRACE
(
"(%p)->(0x%08x %p)
\n
"
,
This
,
value
,
exists
);
*
exists
=
FALSE
;
hr
=
IDWriteFont2_CreateFontFace
(
iface
,
&
fontface
);
if
(
FAILED
(
hr
))
return
hr
;
index
=
0
;
hr
=
IDWriteFontFace_GetGlyphIndices
(
fontface
,
&
value
,
1
,
&
index
);
IDWriteFontFace_Release
(
fontface
);
if
(
FAILED
(
hr
))
return
hr
;
*
exists
=
index
!=
0
;
return
S_OK
;
}
static
HRESULT
WINAPI
dwritefont_CreateFontFace
(
IDWriteFont2
*
iface
,
IDWriteFontFace
**
face
)
...
...
dlls/dwrite/tests/font.c
View file @
9b46e19a
...
...
@@ -218,6 +218,7 @@ static void test_CreateFontFromLOGFONT(void)
BOOL
ret
;
HDC
hdc
;
HFONT
hfont
;
BOOL
exists
;
int
i
;
UINT
r
;
...
...
@@ -251,6 +252,16 @@ if (0)
DeleteDC
(
hdc
);
DeleteObject
(
hfont
);
exists
=
TRUE
;
hr
=
IDWriteFont_HasCharacter
(
font
,
0xd800
,
&
exists
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
exists
==
FALSE
,
"got %d
\n
"
,
exists
);
exists
=
FALSE
;
hr
=
IDWriteFont_HasCharacter
(
font
,
0x20
,
&
exists
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
exists
==
TRUE
,
"got %d
\n
"
,
exists
);
/* now check properties */
weight
=
IDWriteFont_GetWeight
(
font
);
ok
(
weight
==
DWRITE_FONT_WEIGHT_NORMAL
,
"got %d
\n
"
,
weight
);
...
...
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