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
be699372
Commit
be699372
authored
Oct 20, 2012
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 22, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Added a stub for IDWriteFontCollection.
parent
11d94a11
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
106 additions
and
2 deletions
+106
-2
dwrite_private.h
dlls/dwrite/dwrite_private.h
+1
-0
font.c
dlls/dwrite/font.c
+103
-0
main.c
dlls/dwrite/main.c
+2
-2
No files found.
dlls/dwrite/dwrite_private.h
View file @
be699372
...
...
@@ -68,6 +68,7 @@ static inline LPWSTR heap_strdupnW(const WCHAR *str, UINT32 len)
}
extern
HRESULT
create_font_from_logfont
(
const
LOGFONTW
*
,
IDWriteFont
**
)
DECLSPEC_HIDDEN
;
extern
HRESULT
create_fontcollection
(
IDWriteFontCollection
**
)
DECLSPEC_HIDDEN
;
extern
HRESULT
create_textformat
(
const
WCHAR
*
,
DWRITE_FONT_WEIGHT
,
DWRITE_FONT_STYLE
,
DWRITE_FONT_STRETCH
,
FLOAT
,
const
WCHAR
*
,
IDWriteTextFormat
**
)
DECLSPEC_HIDDEN
;
extern
HRESULT
create_textlayout
(
const
WCHAR
*
,
UINT32
,
IDWriteTextLayout
**
)
DECLSPEC_HIDDEN
;
...
...
dlls/dwrite/font.c
View file @
be699372
...
...
@@ -127,6 +127,11 @@ typedef struct
#define MS_OS2_TAG MS_MAKE_TAG('O','S','/','2')
#define MS_POST_TAG MS_MAKE_TAG('p','o','s','t')
struct
dwrite_fontcollection
{
IDWriteFontCollection
IDWriteFontCollection_iface
;
LONG
ref
;
};
struct
dwrite_fontfamily
{
IDWriteFontFamily
IDWriteFontFamily_iface
;
LONG
ref
;
...
...
@@ -166,6 +171,11 @@ static inline struct dwrite_fontfamily *impl_from_IDWriteFontFamily(IDWriteFontF
return
CONTAINING_RECORD
(
iface
,
struct
dwrite_fontfamily
,
IDWriteFontFamily_iface
);
}
static
inline
struct
dwrite_fontcollection
*
impl_from_IDWriteFontCollection
(
IDWriteFontCollection
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
dwrite_fontcollection
,
IDWriteFontCollection_iface
);
}
static
HRESULT
WINAPI
dwritefontface_QueryInterface
(
IDWriteFontFace
*
iface
,
REFIID
riid
,
void
**
obj
)
{
struct
dwrite_fontface
*
This
=
impl_from_IDWriteFontFace
(
iface
);
...
...
@@ -614,6 +624,99 @@ static const IDWriteFontFamilyVtbl fontfamilyvtbl = {
dwritefontfamily_GetMatchingFonts
};
static
HRESULT
WINAPI
dwritefontcollection_QueryInterface
(
IDWriteFontCollection
*
iface
,
REFIID
riid
,
void
**
obj
)
{
struct
dwrite_fontcollection
*
This
=
impl_from_IDWriteFontCollection
(
iface
);
TRACE
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
obj
);
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
IsEqualIID
(
riid
,
&
IID_IDWriteFontCollection
))
{
*
obj
=
iface
;
IDWriteFontCollection_AddRef
(
iface
);
return
S_OK
;
}
*
obj
=
NULL
;
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
dwritefontcollection_AddRef
(
IDWriteFontCollection
*
iface
)
{
struct
dwrite_fontcollection
*
This
=
impl_from_IDWriteFontCollection
(
iface
);
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(%d)
\n
"
,
This
,
ref
);
return
ref
;
}
static
ULONG
WINAPI
dwritefontcollection_Release
(
IDWriteFontCollection
*
iface
)
{
struct
dwrite_fontcollection
*
This
=
impl_from_IDWriteFontCollection
(
iface
);
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(%d)
\n
"
,
This
,
ref
);
if
(
!
ref
)
heap_free
(
This
);
return
ref
;
}
static
UINT32
WINAPI
dwritefontcollection_GetFontFamilyCount
(
IDWriteFontCollection
*
iface
)
{
struct
dwrite_fontcollection
*
This
=
impl_from_IDWriteFontCollection
(
iface
);
FIXME
(
"(%p): stub
\n
"
,
This
);
return
0
;
}
static
HRESULT
WINAPI
dwritefontcollection_GetFontFamily
(
IDWriteFontCollection
*
iface
,
UINT32
index
,
IDWriteFontFamily
**
family
)
{
struct
dwrite_fontcollection
*
This
=
impl_from_IDWriteFontCollection
(
iface
);
FIXME
(
"(%p)->(%u %p): stub
\n
"
,
This
,
index
,
family
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
dwritefontcollection_FindFamilyName
(
IDWriteFontCollection
*
iface
,
const
WCHAR
*
name
,
UINT32
*
index
,
BOOL
*
exists
)
{
struct
dwrite_fontcollection
*
This
=
impl_from_IDWriteFontCollection
(
iface
);
FIXME
(
"(%p)->(%s %p %p): stub
\n
"
,
This
,
debugstr_w
(
name
),
index
,
exists
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
dwritefontcollection_GetFontFromFontFace
(
IDWriteFontCollection
*
iface
,
IDWriteFontFace
*
face
,
IDWriteFont
**
font
)
{
struct
dwrite_fontcollection
*
This
=
impl_from_IDWriteFontCollection
(
iface
);
FIXME
(
"(%p)->(%p %p): stub
\n
"
,
This
,
face
,
font
);
return
E_NOTIMPL
;
}
static
const
IDWriteFontCollectionVtbl
fontcollectionvtbl
=
{
dwritefontcollection_QueryInterface
,
dwritefontcollection_AddRef
,
dwritefontcollection_Release
,
dwritefontcollection_GetFontFamilyCount
,
dwritefontcollection_GetFontFamily
,
dwritefontcollection_FindFamilyName
,
dwritefontcollection_GetFontFromFontFace
};
HRESULT
create_fontcollection
(
IDWriteFontCollection
**
collection
)
{
struct
dwrite_fontcollection
*
This
;
*
collection
=
NULL
;
This
=
heap_alloc
(
sizeof
(
struct
dwrite_fontcollection
));
if
(
!
This
)
return
E_OUTOFMEMORY
;
This
->
IDWriteFontCollection_iface
.
lpVtbl
=
&
fontcollectionvtbl
;
This
->
ref
=
1
;
*
collection
=
&
This
->
IDWriteFontCollection_iface
;
return
S_OK
;
}
static
HRESULT
create_fontfamily
(
const
WCHAR
*
familyname
,
IDWriteFontFamily
**
family
)
{
struct
dwrite_fontfamily
*
This
;
...
...
dlls/dwrite/main.c
View file @
be699372
...
...
@@ -384,8 +384,8 @@ static ULONG WINAPI dwritefactory_Release(IDWriteFactory *iface)
static
HRESULT
WINAPI
dwritefactory_GetSystemFontCollection
(
IDWriteFactory
*
iface
,
IDWriteFontCollection
**
collection
,
BOOL
check_for_updates
)
{
FIXME
(
"(%p %d): stub
\n
"
,
collection
,
check_for_updates
);
return
E_NOTIMPL
;
FIXME
(
"(%p %d): s
emi-s
tub
\n
"
,
collection
,
check_for_updates
);
return
create_fontcollection
(
collection
)
;
}
static
HRESULT
WINAPI
dwritefactory_CreateCustomFontCollection
(
IDWriteFactory
*
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