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
897c1d03
Commit
897c1d03
authored
Apr 19, 2016
by
Nikolay Sivov
Committed by
Alexandre Julliard
Apr 19, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Fix IDWriteFactory3 methods order.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
54b89a29
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
64 additions
and
13 deletions
+64
-13
main.c
dlls/dwrite/main.c
+8
-8
font.c
dlls/dwrite/tests/font.c
+49
-0
dwrite_3.idl
include/dwrite_3.idl
+7
-5
No files found.
dlls/dwrite/main.c
View file @
897c1d03
...
@@ -1261,22 +1261,22 @@ static HRESULT WINAPI dwritefactory3_CreateCustomRenderingParams(IDWriteFactory3
...
@@ -1261,22 +1261,22 @@ static HRESULT WINAPI dwritefactory3_CreateCustomRenderingParams(IDWriteFactory3
gridfit_mode
,
params
);
gridfit_mode
,
params
);
}
}
static
HRESULT
WINAPI
dwritefactory3_CreateFontFaceReference
(
IDWriteFactory3
*
iface
,
WCHAR
const
*
path
,
FILETIME
const
*
writetime
,
static
HRESULT
WINAPI
dwritefactory3_CreateFontFaceReference
_
(
IDWriteFactory3
*
iface
,
IDWriteFontFile
*
file
,
UINT32
index
,
UINT32
index
,
DWRITE_FONT_SIMULATIONS
simulations
,
IDWriteFontFaceReference
**
reference
)
DWRITE_FONT_SIMULATIONS
simulations
,
IDWriteFontFaceReference
**
reference
)
{
{
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory3
(
iface
);
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory3
(
iface
);
FIXME
(
"(%p)->(%
s %p %u %x, %p): stub
\n
"
,
This
,
debugstr_w
(
path
),
writetim
e
,
index
,
simulations
,
reference
);
FIXME
(
"(%p)->(%
p %u %x %p): stub
\n
"
,
This
,
fil
e
,
index
,
simulations
,
reference
);
return
E_NOTIMPL
;
return
E_NOTIMPL
;
}
}
static
HRESULT
WINAPI
dwritefactory3_CreateFontFaceReference
_
(
IDWriteFactory3
*
iface
,
IDWriteFontFile
*
file
,
UINT32
index
,
static
HRESULT
WINAPI
dwritefactory3_CreateFontFaceReference
(
IDWriteFactory3
*
iface
,
WCHAR
const
*
path
,
FILETIME
const
*
writetime
,
DWRITE_FONT_SIMULATIONS
simulations
,
IDWriteFontFaceReference
**
reference
)
UINT32
index
,
DWRITE_FONT_SIMULATIONS
simulations
,
IDWriteFontFaceReference
**
reference
)
{
{
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory3
(
iface
);
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory3
(
iface
);
FIXME
(
"(%p)->(%
p %u %x %p): stub
\n
"
,
This
,
fil
e
,
index
,
simulations
,
reference
);
FIXME
(
"(%p)->(%
s %p %u %x, %p): stub
\n
"
,
This
,
debugstr_w
(
path
),
writetim
e
,
index
,
simulations
,
reference
);
return
E_NOTIMPL
;
return
E_NOTIMPL
;
}
}
...
@@ -1362,8 +1362,8 @@ static const struct IDWriteFactory3Vtbl dwritefactoryvtbl = {
...
@@ -1362,8 +1362,8 @@ static const struct IDWriteFactory3Vtbl dwritefactoryvtbl = {
dwritefactory2_CreateGlyphRunAnalysis
,
dwritefactory2_CreateGlyphRunAnalysis
,
dwritefactory3_CreateGlyphRunAnalysis
,
dwritefactory3_CreateGlyphRunAnalysis
,
dwritefactory3_CreateCustomRenderingParams
,
dwritefactory3_CreateCustomRenderingParams
,
dwritefactory3_CreateFontFaceReference
,
dwritefactory3_CreateFontFaceReference_
,
dwritefactory3_CreateFontFaceReference_
,
dwritefactory3_CreateFontFaceReference
,
dwritefactory3_GetSystemFontSet
,
dwritefactory3_GetSystemFontSet
,
dwritefactory3_CreateFontSetBuilder
,
dwritefactory3_CreateFontSetBuilder
,
dwritefactory3_CreateFontCollectionFromFontSet
,
dwritefactory3_CreateFontCollectionFromFontSet
,
...
@@ -1419,8 +1419,8 @@ static const struct IDWriteFactory3Vtbl shareddwritefactoryvtbl = {
...
@@ -1419,8 +1419,8 @@ static const struct IDWriteFactory3Vtbl shareddwritefactoryvtbl = {
dwritefactory2_CreateGlyphRunAnalysis
,
dwritefactory2_CreateGlyphRunAnalysis
,
dwritefactory3_CreateGlyphRunAnalysis
,
dwritefactory3_CreateGlyphRunAnalysis
,
dwritefactory3_CreateCustomRenderingParams
,
dwritefactory3_CreateCustomRenderingParams
,
dwritefactory3_CreateFontFaceReference
,
dwritefactory3_CreateFontFaceReference_
,
dwritefactory3_CreateFontFaceReference_
,
dwritefactory3_CreateFontFaceReference
,
dwritefactory3_GetSystemFontSet
,
dwritefactory3_GetSystemFontSet
,
dwritefactory3_CreateFontSetBuilder
,
dwritefactory3_CreateFontSetBuilder
,
dwritefactory3_CreateFontCollectionFromFontSet
,
dwritefactory3_CreateFontCollectionFromFontSet
,
...
...
dlls/dwrite/tests/font.c
View file @
897c1d03
...
@@ -5792,6 +5792,54 @@ static void test_HasCharacter(void)
...
@@ -5792,6 +5792,54 @@ static void test_HasCharacter(void)
IDWriteFactory_Release
(
factory
);
IDWriteFactory_Release
(
factory
);
}
}
static
void
test_CreateFontFaceReference
(
void
)
{
static
const
WCHAR
dummyW
[]
=
{
'd'
,
'u'
,
'm'
,
'm'
,
'y'
,
0
};
IDWriteFontFaceReference
*
ref
;
IDWriteFactory3
*
factory3
;
IDWriteFactory
*
factory
;
UINT32
index
;
WCHAR
*
path
;
HRESULT
hr
;
factory
=
create_factory
();
hr
=
IDWriteFactory_QueryInterface
(
factory
,
&
IID_IDWriteFactory3
,
(
void
**
)
&
factory3
);
IDWriteFactory_Release
(
factory
);
if
(
FAILED
(
hr
))
{
win_skip
(
"CreateFontFaceReference() is not supported.
\n
"
);
return
;
}
path
=
create_testfontfile
(
test_fontfile
);
hr
=
IDWriteFactory3_CreateFontFaceReference
(
factory3
,
NULL
,
NULL
,
0
,
DWRITE_FONT_SIMULATIONS_NONE
,
&
ref
);
todo_wine
ok
(
hr
==
E_INVALIDARG
,
"got 0x%08x
\n
"
,
hr
);
/* test file is not a collection, but reference could still be created */
hr
=
IDWriteFactory3_CreateFontFaceReference
(
factory3
,
path
,
NULL
,
1
,
DWRITE_FONT_SIMULATIONS_NONE
,
&
ref
);
todo_wine
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
if
(
hr
==
S_OK
)
{
index
=
IDWriteFontFaceReference_GetFontFaceIndex
(
ref
);
ok
(
index
==
1
,
"got %u
\n
"
,
index
);
}
/* path however has to be valid */
hr
=
IDWriteFactory3_CreateFontFaceReference
(
factory3
,
dummyW
,
NULL
,
0
,
DWRITE_FONT_SIMULATIONS_NONE
,
&
ref
);
todo_wine
ok
(
hr
==
DWRITE_E_FILENOTFOUND
,
"got 0x%08x
\n
"
,
hr
);
hr
=
IDWriteFactory3_CreateFontFaceReference
(
factory3
,
path
,
NULL
,
0
,
DWRITE_FONT_SIMULATIONS_NONE
,
&
ref
);
todo_wine
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
if
(
hr
==
S_OK
)
IDWriteFontFaceReference_Release
(
ref
);
IDWriteFactory3_Release
(
factory3
);
DELETE_FONTFILE
(
path
);
}
START_TEST
(
font
)
START_TEST
(
font
)
{
{
IDWriteFactory
*
factory
;
IDWriteFactory
*
factory
;
...
@@ -5846,6 +5894,7 @@ START_TEST(font)
...
@@ -5846,6 +5894,7 @@ START_TEST(font)
test_GetPaletteEntries
();
test_GetPaletteEntries
();
test_TranslateColorGlyphRun
();
test_TranslateColorGlyphRun
();
test_HasCharacter
();
test_HasCharacter
();
test_CreateFontFaceReference
();
IDWriteFactory_Release
(
factory
);
IDWriteFactory_Release
(
factory
);
}
}
include/dwrite_3.idl
View file @
897c1d03
...
@@ -282,15 +282,17 @@ interface IDWriteFactory3 : IDWriteFactory2
...
@@ -282,15 +282,17 @@ interface IDWriteFactory3 : IDWriteFactory2
DWRITE_GRID_FIT_MODE
gridfit_mode
,
DWRITE_GRID_FIT_MODE
gridfit_mode
,
IDWriteRenderingParams3
**
params
)
;
IDWriteRenderingParams3
**
params
)
;
HRESULT
CreateFontFaceReference
(
/*
CreateFontFaceReference
methods
are
listed
in
reversed
order
to
make
WCHAR
const
*
path
,
resulting
vtable
order
compatible
.
*/
FILETIME
const
*
writetime
,
HRESULT
CreateFontFaceReference_
(
IDWriteFontFile
*
file
,
UINT32
index
,
UINT32
index
,
DWRITE_FONT_SIMULATIONS
simulations
,
DWRITE_FONT_SIMULATIONS
simulations
,
IDWriteFontFaceReference
**
reference
)
;
IDWriteFontFaceReference
**
reference
)
;
HRESULT
CreateFontFaceReference_
(
HRESULT
CreateFontFaceReference
(
IDWriteFontFile
*
file
,
WCHAR
const
*
path
,
FILETIME
const
*
writetime
,
UINT32
index
,
UINT32
index
,
DWRITE_FONT_SIMULATIONS
simulations
,
DWRITE_FONT_SIMULATIONS
simulations
,
IDWriteFontFaceReference
**
reference
)
;
IDWriteFontFaceReference
**
reference
)
;
...
...
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