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
561ac1d8
Commit
561ac1d8
authored
Oct 22, 2014
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 23, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite/tests: Some tests for local font file loader.
parent
27296466
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
0 deletions
+41
-0
font.c
dlls/dwrite/tests/font.c
+41
-0
No files found.
dlls/dwrite/tests/font.c
View file @
561ac1d8
...
...
@@ -859,8 +859,13 @@ todo_wine
static
void
test_system_fontcollection
(
void
)
{
IDWriteFontCollection
*
collection
,
*
coll2
;
IDWriteLocalFontFileLoader
*
localloader
;
IDWriteFactory
*
factory
,
*
factory2
;
IDWriteFontFileLoader
*
loader
;
IDWriteFontFamily
*
family
;
IDWriteFontFace
*
fontface
;
IDWriteFontFile
*
file
;
IDWriteFont
*
font
;
HRESULT
hr
;
UINT32
i
;
BOOL
ret
;
...
...
@@ -904,6 +909,42 @@ static void test_system_fontcollection(void)
ok
(
ret
,
"got %d
\n
"
,
ret
);
ok
(
i
!=
(
UINT32
)
-
1
,
"got %u
\n
"
,
i
);
/* get back local file loader */
hr
=
IDWriteFontCollection_GetFontFamily
(
collection
,
i
,
&
family
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
hr
=
IDWriteFontFamily_GetFirstMatchingFont
(
family
,
DWRITE_FONT_WEIGHT_NORMAL
,
DWRITE_FONT_STRETCH_NORMAL
,
DWRITE_FONT_STYLE_NORMAL
,
&
font
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
IDWriteFontFamily_Release
(
family
);
hr
=
IDWriteFont_CreateFontFace
(
font
,
&
fontface
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
IDWriteFont_Release
(
font
);
i
=
1
;
file
=
NULL
;
hr
=
IDWriteFontFace_GetFiles
(
fontface
,
&
i
,
&
file
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
todo_wine
ok
(
file
!=
NULL
,
"got %p
\n
"
,
file
);
if
(
file
)
{
hr
=
IDWriteFontFile_GetLoader
(
file
,
&
loader
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
IDWriteFontFile_Release
(
file
);
hr
=
IDWriteFontFileLoader_QueryInterface
(
loader
,
&
IID_IDWriteLocalFontFileLoader
,
(
void
**
)
&
localloader
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
IDWriteLocalFontFileLoader_Release
(
localloader
);
/* local loader is not registered by default */
hr
=
IDWriteFactory_RegisterFontFileLoader
(
factory
,
loader
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
hr
=
IDWriteFactory_UnregisterFontFileLoader
(
factory
,
loader
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
IDWriteFontFileLoader_Release
(
loader
);
}
ret
=
TRUE
;
i
=
0
;
hr
=
IDWriteFontCollection_FindFamilyName
(
collection
,
blahW
,
&
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