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
988cf549
Commit
988cf549
authored
Oct 11, 2016
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 11, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Update to IDWriteFactory4.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0e5eed10
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
203 additions
and
166 deletions
+203
-166
analyzer.c
dlls/dwrite/analyzer.c
+5
-5
dwrite_private.h
dlls/dwrite/dwrite_private.h
+11
-11
font.c
dlls/dwrite/font.c
+23
-23
gdiinterop.c
dlls/dwrite/gdiinterop.c
+6
-6
layout.c
dlls/dwrite/layout.c
+7
-7
main.c
dlls/dwrite/main.c
+151
-114
No files found.
dlls/dwrite/analyzer.c
View file @
988cf549
...
...
@@ -193,7 +193,7 @@ static const struct fallback_mapping fontfallback_neutral_data[] = {
struct
dwrite_fontfallback
{
IDWriteFontFallback
IDWriteFontFallback_iface
;
IDWriteFactory
3
*
factory
;
IDWriteFactory
4
*
factory
;
IDWriteFontCollection1
*
systemcollection
;
const
struct
fallback_mapping
*
mappings
;
UINT32
count
;
...
...
@@ -1785,14 +1785,14 @@ static ULONG WINAPI fontfallback_AddRef(IDWriteFontFallback *iface)
{
struct
dwrite_fontfallback
*
fallback
=
impl_from_IDWriteFontFallback
(
iface
);
TRACE
(
"(%p)
\n
"
,
fallback
);
return
IDWriteFactory
3
_AddRef
(
fallback
->
factory
);
return
IDWriteFactory
4
_AddRef
(
fallback
->
factory
);
}
static
ULONG
WINAPI
fontfallback_Release
(
IDWriteFontFallback
*
iface
)
{
struct
dwrite_fontfallback
*
fallback
=
impl_from_IDWriteFontFallback
(
iface
);
TRACE
(
"(%p)
\n
"
,
fallback
);
return
IDWriteFactory
3
_Release
(
fallback
->
factory
);
return
IDWriteFactory
4
_Release
(
fallback
->
factory
);
}
static
int
compare_fallback_mapping
(
const
void
*
a
,
const
void
*
b
)
...
...
@@ -1968,7 +1968,7 @@ static const IDWriteFontFallbackVtbl fontfallbackvtbl = {
fontfallback_MapCharacters
};
HRESULT
create_system_fontfallback
(
IDWriteFactory
3
*
factory
,
IDWriteFontFallback
**
ret
)
HRESULT
create_system_fontfallback
(
IDWriteFactory
4
*
factory
,
IDWriteFontFallback
**
ret
)
{
struct
dwrite_fontfallback
*
fallback
;
...
...
@@ -1982,7 +1982,7 @@ HRESULT create_system_fontfallback(IDWriteFactory3 *factory, IDWriteFontFallback
fallback
->
factory
=
factory
;
fallback
->
mappings
=
fontfallback_neutral_data
;
fallback
->
count
=
sizeof
(
fontfallback_neutral_data
)
/
sizeof
(
fontfallback_neutral_data
[
0
]);
IDWriteFactory
3
_GetSystemFontCollection
(
fallback
->
factory
,
FALSE
,
&
fallback
->
systemcollection
,
FALSE
);
IDWriteFactory
4
_GetSystemFontCollection
(
fallback
->
factory
,
FALSE
,
&
fallback
->
systemcollection
,
FALSE
);
*
ret
=
&
fallback
->
IDWriteFontFallback_iface
;
return
S_OK
;
...
...
dlls/dwrite/dwrite_private.h
View file @
988cf549
...
...
@@ -121,12 +121,12 @@ static inline BOOL is_simulation_valid(DWRITE_FONT_SIMULATIONS simulations)
struct
gdiinterop
{
IDWriteGdiInterop1
IDWriteGdiInterop1_iface
;
IDWriteFactory
3
*
factory
;
IDWriteFactory
4
*
factory
;
};
struct
textlayout_desc
{
IDWriteFactory
3
*
factory
;
IDWriteFactory
4
*
factory
;
const
WCHAR
*
string
;
UINT32
length
;
IDWriteTextFormat
*
format
;
...
...
@@ -154,7 +154,7 @@ struct glyphrunanalysis_desc
struct
fontface_desc
{
IDWriteFactory
3
*
factory
;
IDWriteFactory
4
*
factory
;
DWRITE_FONT_FACE_TYPE
face_type
;
IDWriteFontFile
*
const
*
files
;
UINT32
files_number
;
...
...
@@ -168,20 +168,20 @@ extern HRESULT create_numbersubstitution(DWRITE_NUMBER_SUBSTITUTION_METHOD,const
extern
HRESULT
create_textformat
(
const
WCHAR
*
,
IDWriteFontCollection
*
,
DWRITE_FONT_WEIGHT
,
DWRITE_FONT_STYLE
,
DWRITE_FONT_STRETCH
,
FLOAT
,
const
WCHAR
*
,
IDWriteTextFormat
**
)
DECLSPEC_HIDDEN
;
extern
HRESULT
create_textlayout
(
const
struct
textlayout_desc
*
,
IDWriteTextLayout
**
)
DECLSPEC_HIDDEN
;
extern
HRESULT
create_trimmingsign
(
IDWriteFactory
3
*
,
IDWriteTextFormat
*
,
IDWriteInlineObject
**
)
DECLSPEC_HIDDEN
;
extern
HRESULT
create_trimmingsign
(
IDWriteFactory
4
*
,
IDWriteTextFormat
*
,
IDWriteInlineObject
**
)
DECLSPEC_HIDDEN
;
extern
HRESULT
create_typography
(
IDWriteTypography
**
)
DECLSPEC_HIDDEN
;
extern
void
gdiinterop_init
(
struct
gdiinterop
*
,
IDWriteFactory
3
*
)
DECLSPEC_HIDDEN
;
extern
void
gdiinterop_init
(
struct
gdiinterop
*
,
IDWriteFactory
4
*
)
DECLSPEC_HIDDEN
;
extern
HRESULT
create_localizedstrings
(
IDWriteLocalizedStrings
**
)
DECLSPEC_HIDDEN
;
extern
HRESULT
add_localizedstring
(
IDWriteLocalizedStrings
*
,
const
WCHAR
*
,
const
WCHAR
*
)
DECLSPEC_HIDDEN
;
extern
HRESULT
clone_localizedstring
(
IDWriteLocalizedStrings
*
iface
,
IDWriteLocalizedStrings
**
strings
)
DECLSPEC_HIDDEN
;
extern
void
set_en_localizedstring
(
IDWriteLocalizedStrings
*
,
const
WCHAR
*
)
DECLSPEC_HIDDEN
;
extern
HRESULT
get_system_fontcollection
(
IDWriteFactory
3
*
,
IDWriteFontCollection1
**
)
DECLSPEC_HIDDEN
;
extern
HRESULT
get_eudc_fontcollection
(
IDWriteFactory
3
*
,
IDWriteFontCollection
**
)
DECLSPEC_HIDDEN
;
extern
HRESULT
get_system_fontcollection
(
IDWriteFactory
4
*
,
IDWriteFontCollection1
**
)
DECLSPEC_HIDDEN
;
extern
HRESULT
get_eudc_fontcollection
(
IDWriteFactory
4
*
,
IDWriteFontCollection
**
)
DECLSPEC_HIDDEN
;
extern
HRESULT
get_textanalyzer
(
IDWriteTextAnalyzer
**
)
DECLSPEC_HIDDEN
;
extern
HRESULT
create_font_file
(
IDWriteFontFileLoader
*
loader
,
const
void
*
reference_key
,
UINT32
key_size
,
IDWriteFontFile
**
font_file
)
DECLSPEC_HIDDEN
;
extern
HRESULT
create_localfontfileloader
(
IDWriteLocalFontFileLoader
**
iface
)
DECLSPEC_HIDDEN
;
extern
HRESULT
create_fontface
(
const
struct
fontface_desc
*
,
IDWriteFontFace3
**
)
DECLSPEC_HIDDEN
;
extern
HRESULT
create_font_collection
(
IDWriteFactory
3
*
,
IDWriteFontFileEnumerator
*
,
BOOL
,
IDWriteFontCollection1
**
)
DECLSPEC_HIDDEN
;
extern
HRESULT
create_font_collection
(
IDWriteFactory
4
*
,
IDWriteFontFileEnumerator
*
,
BOOL
,
IDWriteFontCollection1
**
)
DECLSPEC_HIDDEN
;
extern
HRESULT
create_glyphrunanalysis
(
const
struct
glyphrunanalysis_desc
*
,
IDWriteGlyphRunAnalysis
**
)
DECLSPEC_HIDDEN
;
extern
BOOL
is_system_collection
(
IDWriteFontCollection
*
)
DECLSPEC_HIDDEN
;
extern
HRESULT
get_local_refkey
(
const
WCHAR
*
,
const
FILETIME
*
,
void
**
,
UINT32
*
)
DECLSPEC_HIDDEN
;
...
...
@@ -191,13 +191,13 @@ extern HRESULT get_family_names_from_stream(IDWriteFontFileStream*,UINT32,DWRITE
extern
HRESULT
create_colorglyphenum
(
FLOAT
,
FLOAT
,
const
DWRITE_GLYPH_RUN
*
,
const
DWRITE_GLYPH_RUN_DESCRIPTION
*
,
DWRITE_MEASURING_MODE
,
const
DWRITE_MATRIX
*
,
UINT32
,
IDWriteColorGlyphRunEnumerator
**
)
DECLSPEC_HIDDEN
;
extern
BOOL
lb_is_newline_char
(
WCHAR
)
DECLSPEC_HIDDEN
;
extern
HRESULT
create_system_fontfallback
(
IDWriteFactory
3
*
,
IDWriteFontFallback
**
)
DECLSPEC_HIDDEN
;
extern
HRESULT
create_system_fontfallback
(
IDWriteFactory
4
*
,
IDWriteFontFallback
**
)
DECLSPEC_HIDDEN
;
extern
void
release_system_fontfallback
(
IDWriteFontFallback
*
)
DECLSPEC_HIDDEN
;
extern
HRESULT
create_matching_font
(
IDWriteFontCollection
*
,
const
WCHAR
*
,
DWRITE_FONT_WEIGHT
,
DWRITE_FONT_STYLE
,
DWRITE_FONT_STRETCH
,
IDWriteFont
**
)
DECLSPEC_HIDDEN
;
extern
HRESULT
create_fontfacereference
(
IDWriteFactory
3
*
,
IDWriteFontFile
*
,
UINT32
,
DWRITE_FONT_SIMULATIONS
,
extern
HRESULT
create_fontfacereference
(
IDWriteFactory
4
*
,
IDWriteFontFile
*
,
UINT32
,
DWRITE_FONT_SIMULATIONS
,
IDWriteFontFaceReference
**
)
DECLSPEC_HIDDEN
;
extern
HRESULT
factory_get_cached_fontface
(
IDWriteFactory
3
*
,
IDWriteFontFile
*
const
*
,
UINT32
,
DWRITE_FONT_SIMULATIONS
,
IDWriteFontFace
**
,
extern
HRESULT
factory_get_cached_fontface
(
IDWriteFactory
4
*
,
IDWriteFontFile
*
const
*
,
UINT32
,
DWRITE_FONT_SIMULATIONS
,
IDWriteFontFace
**
,
struct
list
**
)
DECLSPEC_HIDDEN
;
extern
void
factory_cache_fontface
(
struct
list
*
,
IDWriteFontFace3
*
)
DECLSPEC_HIDDEN
;
...
...
dlls/dwrite/font.c
View file @
988cf549
...
...
@@ -81,7 +81,7 @@ struct dwrite_font_data {
IDWriteLocalizedStrings
*
names
;
/* data needed to create fontface instance */
IDWriteFactory
3
*
factory
;
IDWriteFactory
4
*
factory
;
DWRITE_FONT_FACE_TYPE
face_type
;
IDWriteFontFile
*
file
;
UINT32
face_index
;
...
...
@@ -258,7 +258,7 @@ struct dwrite_fontfacereference {
IDWriteFontFile
*
file
;
UINT32
index
;
USHORT
simulations
;
IDWriteFactory
3
*
factory
;
IDWriteFactory
4
*
factory
;
};
static
inline
struct
dwrite_fontface
*
impl_from_IDWriteFontFace3
(
IDWriteFontFace3
*
iface
)
...
...
@@ -414,7 +414,7 @@ static void release_font_data(struct dwrite_font_data *data)
IDWriteLocalizedStrings_Release
(
data
->
names
);
IDWriteFontFile_Release
(
data
->
file
);
IDWriteFactory
3
_Release
(
data
->
factory
);
IDWriteFactory
4
_Release
(
data
->
factory
);
heap_free
(
data
->
facename
);
heap_free
(
data
);
}
...
...
@@ -1589,7 +1589,7 @@ static HRESULT WINAPI dwritefont3_GetFontFaceReference(IDWriteFont3 *iface, IDWr
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
reference
);
return
IDWriteFactory
3
_CreateFontFaceReference_
(
This
->
data
->
factory
,
This
->
data
->
file
,
This
->
data
->
face_index
,
return
IDWriteFactory
4
_CreateFontFaceReference_
(
This
->
data
->
factory
,
This
->
data
->
file
,
This
->
data
->
face_index
,
This
->
data
->
simulations
,
reference
);
}
...
...
@@ -3188,7 +3188,7 @@ static HRESULT init_font_data(const struct fontface_desc *desc, IDWriteLocalized
data
->
bold_sim_tested
=
0
;
data
->
oblique_sim_tested
=
0
;
IDWriteFontFile_AddRef
(
data
->
file
);
IDWriteFactory
3
_AddRef
(
data
->
factory
);
IDWriteFactory
4
_AddRef
(
data
->
factory
);
stream_desc
.
stream
=
stream
;
stream_desc
.
face_type
=
desc
->
face_type
;
...
...
@@ -3243,7 +3243,7 @@ static HRESULT init_font_data_from_font(const struct dwrite_font_data *src, DWRI
data
->
style
=
DWRITE_FONT_STYLE_OBLIQUE
;
memset
(
data
->
info_strings
,
0
,
sizeof
(
data
->
info_strings
));
data
->
names
=
NULL
;
IDWriteFactory
3
_AddRef
(
data
->
factory
);
IDWriteFactory
4
_AddRef
(
data
->
factory
);
IDWriteFontFile_AddRef
(
data
->
file
);
create_localizedstrings
(
&
data
->
names
);
...
...
@@ -3499,7 +3499,7 @@ static void fontcollection_add_replacements(struct dwrite_fontcollection *collec
RegCloseKey
(
hkey
);
}
HRESULT
create_font_collection
(
IDWriteFactory
3
*
factory
,
IDWriteFontFileEnumerator
*
enumerator
,
BOOL
is_system
,
HRESULT
create_font_collection
(
IDWriteFactory
4
*
factory
,
IDWriteFontFileEnumerator
*
enumerator
,
BOOL
is_system
,
IDWriteFontCollection1
**
ret
)
{
struct
fontfile_enum
{
...
...
@@ -3651,7 +3651,7 @@ struct system_fontfile_enumerator
IDWriteFontFileEnumerator
IDWriteFontFileEnumerator_iface
;
LONG
ref
;
IDWriteFactory
3
*
factory
;
IDWriteFactory
4
*
factory
;
HKEY
hkey
;
int
index
;
};
...
...
@@ -3686,7 +3686,7 @@ static ULONG WINAPI systemfontfileenumerator_Release(IDWriteFontFileEnumerator *
ULONG
ref
=
InterlockedDecrement
(
&
enumerator
->
ref
);
if
(
!
ref
)
{
IDWriteFactory
3
_Release
(
enumerator
->
factory
);
IDWriteFactory
4
_Release
(
enumerator
->
factory
);
RegCloseKey
(
enumerator
->
hkey
);
heap_free
(
enumerator
);
}
...
...
@@ -3694,7 +3694,7 @@ static ULONG WINAPI systemfontfileenumerator_Release(IDWriteFontFileEnumerator *
return
ref
;
}
static
HRESULT
create_local_file_reference
(
IDWriteFactory
3
*
factory
,
const
WCHAR
*
filename
,
IDWriteFontFile
**
file
)
static
HRESULT
create_local_file_reference
(
IDWriteFactory
4
*
factory
,
const
WCHAR
*
filename
,
IDWriteFontFile
**
file
)
{
HRESULT
hr
;
...
...
@@ -3707,10 +3707,10 @@ static HRESULT create_local_file_reference(IDWriteFactory3 *factory, const WCHAR
strcatW
(
fullpathW
,
fontsW
);
strcatW
(
fullpathW
,
filename
);
hr
=
IDWriteFactory
3
_CreateFontFileReference
(
factory
,
fullpathW
,
NULL
,
file
);
hr
=
IDWriteFactory
4
_CreateFontFileReference
(
factory
,
fullpathW
,
NULL
,
file
);
}
else
hr
=
IDWriteFactory
3
_CreateFontFileReference
(
factory
,
filename
,
NULL
,
file
);
hr
=
IDWriteFactory
4
_CreateFontFileReference
(
factory
,
filename
,
NULL
,
file
);
return
hr
;
}
...
...
@@ -3798,7 +3798,7 @@ static const struct IDWriteFontFileEnumeratorVtbl systemfontfileenumeratorvtbl =
systemfontfileenumerator_GetCurrentFontFile
};
static
HRESULT
create_system_fontfile_enumerator
(
IDWriteFactory
3
*
factory
,
IDWriteFontFileEnumerator
**
ret
)
static
HRESULT
create_system_fontfile_enumerator
(
IDWriteFactory
4
*
factory
,
IDWriteFontFileEnumerator
**
ret
)
{
struct
system_fontfile_enumerator
*
enumerator
;
static
const
WCHAR
fontslistW
[]
=
{
...
...
@@ -3817,11 +3817,11 @@ static HRESULT create_system_fontfile_enumerator(IDWriteFactory3 *factory, IDWri
enumerator
->
ref
=
1
;
enumerator
->
factory
=
factory
;
enumerator
->
index
=
-
1
;
IDWriteFactory
3
_AddRef
(
factory
);
IDWriteFactory
4
_AddRef
(
factory
);
if
(
RegOpenKeyExW
(
HKEY_LOCAL_MACHINE
,
fontslistW
,
0
,
GENERIC_READ
,
&
enumerator
->
hkey
))
{
ERR
(
"failed to open fonts list key
\n
"
);
IDWriteFactory
3
_Release
(
factory
);
IDWriteFactory
4
_Release
(
factory
);
heap_free
(
enumerator
);
return
E_FAIL
;
}
...
...
@@ -3831,7 +3831,7 @@ static HRESULT create_system_fontfile_enumerator(IDWriteFactory3 *factory, IDWri
return
S_OK
;
}
HRESULT
get_system_fontcollection
(
IDWriteFactory
3
*
factory
,
IDWriteFontCollection1
**
collection
)
HRESULT
get_system_fontcollection
(
IDWriteFactory
4
*
factory
,
IDWriteFontCollection1
**
collection
)
{
IDWriteFontFileEnumerator
*
enumerator
;
HRESULT
hr
;
...
...
@@ -3848,7 +3848,7 @@ HRESULT get_system_fontcollection(IDWriteFactory3 *factory, IDWriteFontCollectio
return
hr
;
}
static
HRESULT
eudc_collection_add_family
(
IDWriteFactory
3
*
factory
,
struct
dwrite_fontcollection
*
collection
,
static
HRESULT
eudc_collection_add_family
(
IDWriteFactory
4
*
factory
,
struct
dwrite_fontcollection
*
collection
,
const
WCHAR
*
keynameW
,
const
WCHAR
*
pathW
)
{
static
const
WCHAR
defaultfontW
[]
=
{
'S'
,
'y'
,
's'
,
't'
,
'e'
,
'm'
,
'D'
,
'e'
,
'f'
,
'a'
,
'u'
,
'l'
,
't'
,
'E'
,
'U'
,
'D'
,
'C'
,
'F'
,
'o'
,
'n'
,
't'
,
0
};
...
...
@@ -3927,7 +3927,7 @@ static HRESULT eudc_collection_add_family(IDWriteFactory3 *factory, struct dwrit
return
hr
;
}
HRESULT
get_eudc_fontcollection
(
IDWriteFactory
3
*
factory
,
IDWriteFontCollection
**
ret
)
HRESULT
get_eudc_fontcollection
(
IDWriteFactory
4
*
factory
,
IDWriteFontCollection
**
ret
)
{
static
const
WCHAR
eudckeyfmtW
[]
=
{
'E'
,
'U'
,
'D'
,
'C'
,
'\\'
,
'%'
,
'u'
,
0
};
struct
dwrite_fontcollection
*
collection
;
...
...
@@ -5535,7 +5535,7 @@ static ULONG WINAPI fontfacereference_Release(IDWriteFontFaceReference *iface)
if
(
!
ref
)
{
IDWriteFontFile_Release
(
This
->
file
);
IDWriteFactory
3
_Release
(
This
->
factory
);
IDWriteFactory
4
_Release
(
This
->
factory
);
heap_free
(
This
);
}
...
...
@@ -5568,7 +5568,7 @@ static HRESULT WINAPI fontfacereference_CreateFontFaceWithSimulations(IDWriteFon
if
(
FAILED
(
hr
))
return
hr
;
hr
=
IDWriteFactory
3
_CreateFontFace
(
This
->
factory
,
face_type
,
1
,
&
This
->
file
,
This
->
index
,
simulations
,
&
fontface
);
hr
=
IDWriteFactory
4
_CreateFontFace
(
This
->
factory
,
face_type
,
1
,
&
This
->
file
,
This
->
index
,
simulations
,
&
fontface
);
if
(
SUCCEEDED
(
hr
))
{
hr
=
IDWriteFontFace_QueryInterface
(
fontface
,
&
IID_IDWriteFontFace3
,
(
void
**
)
ret
);
IDWriteFontFace_Release
(
fontface
);
...
...
@@ -5632,7 +5632,7 @@ static HRESULT WINAPI fontfacereference_GetFontFile(IDWriteFontFaceReference *if
if
(
FAILED
(
hr
))
return
hr
;
hr
=
IDWriteFactory
3
_CreateCustomFontFileReference
(
This
->
factory
,
key
,
key_size
,
loader
,
file
);
hr
=
IDWriteFactory
4
_CreateCustomFontFileReference
(
This
->
factory
,
key
,
key_size
,
loader
,
file
);
IDWriteFontFileLoader_Release
(
loader
);
return
hr
;
...
...
@@ -5733,7 +5733,7 @@ static const IDWriteFontFaceReferenceVtbl fontfacereferencevtbl = {
fontfacereference_EnqueueFileFragmentDownloadRequest
};
HRESULT
create_fontfacereference
(
IDWriteFactory
3
*
factory
,
IDWriteFontFile
*
file
,
UINT32
index
,
HRESULT
create_fontfacereference
(
IDWriteFactory
4
*
factory
,
IDWriteFontFile
*
file
,
UINT32
index
,
DWRITE_FONT_SIMULATIONS
simulations
,
IDWriteFontFaceReference
**
ret
)
{
struct
dwrite_fontfacereference
*
ref
;
...
...
@@ -5751,7 +5751,7 @@ HRESULT create_fontfacereference(IDWriteFactory3 *factory, IDWriteFontFile *file
ref
->
ref
=
1
;
ref
->
factory
=
factory
;
IDWriteFactory
3
_AddRef
(
ref
->
factory
);
IDWriteFactory
4
_AddRef
(
ref
->
factory
);
ref
->
file
=
file
;
IDWriteFontFile_AddRef
(
ref
->
file
);
ref
->
index
=
index
;
...
...
dlls/dwrite/gdiinterop.c
View file @
988cf549
...
...
@@ -599,14 +599,14 @@ static ULONG WINAPI gdiinterop_AddRef(IDWriteGdiInterop1 *iface)
{
struct
gdiinterop
*
This
=
impl_from_IDWriteGdiInterop1
(
iface
);
TRACE
(
"(%p)
\n
"
,
This
);
return
IDWriteFactory
3
_AddRef
(
This
->
factory
);
return
IDWriteFactory
4
_AddRef
(
This
->
factory
);
}
static
ULONG
WINAPI
gdiinterop_Release
(
IDWriteGdiInterop1
*
iface
)
{
struct
gdiinterop
*
This
=
impl_from_IDWriteGdiInterop1
(
iface
);
TRACE
(
"(%p)
\n
"
,
This
);
return
IDWriteFactory
3
_Release
(
This
->
factory
);
return
IDWriteFactory
4
_Release
(
This
->
factory
);
}
static
HRESULT
WINAPI
gdiinterop_CreateFontFromLOGFONT
(
IDWriteGdiInterop1
*
iface
,
...
...
@@ -805,7 +805,7 @@ static HRESULT WINAPI gdiinterop_CreateFontFaceFromHdc(IDWriteGdiInterop1 *iface
return
E_FAIL
;
}
hr
=
IDWriteFactory
3
_CreateFontFileReference
(
This
->
factory
,
fileinfo
->
path
,
&
fileinfo
->
writetime
,
hr
=
IDWriteFactory
4
_CreateFontFileReference
(
This
->
factory
,
fileinfo
->
path
,
&
fileinfo
->
writetime
,
&
file
);
heap_free
(
fileinfo
);
if
(
FAILED
(
hr
))
...
...
@@ -819,7 +819,7 @@ static HRESULT WINAPI gdiinterop_CreateFontFaceFromHdc(IDWriteGdiInterop1 *iface
}
/* Simulations flags values match DWRITE_FONT_SIMULATIONS */
hr
=
IDWriteFactory
3
_CreateFontFace
(
This
->
factory
,
facetype
,
1
,
&
file
,
info
.
face_index
,
info
.
simulations
,
hr
=
IDWriteFactory
4
_CreateFontFace
(
This
->
factory
,
facetype
,
1
,
&
file
,
info
.
face_index
,
info
.
simulations
,
fontface
);
IDWriteFontFile_Release
(
file
);
return
hr
;
...
...
@@ -852,7 +852,7 @@ static HRESULT WINAPI gdiinterop1_CreateFontFromLOGFONT(IDWriteGdiInterop1 *ifac
if
(
collection
)
IDWriteFontCollection_AddRef
(
collection
);
else
{
hr
=
IDWriteFactory
3
_GetSystemFontCollection
(
This
->
factory
,
FALSE
,
(
IDWriteFontCollection1
**
)
&
collection
,
FALSE
);
hr
=
IDWriteFactory
4
_GetSystemFontCollection
(
This
->
factory
,
FALSE
,
(
IDWriteFontCollection1
**
)
&
collection
,
FALSE
);
if
(
FAILED
(
hr
))
{
ERR
(
"failed to get system font collection: 0x%08x.
\n
"
,
hr
);
return
hr
;
...
...
@@ -957,7 +957,7 @@ static const struct IDWriteGdiInterop1Vtbl gdiinteropvtbl = {
gdiinterop1_GetMatchingFontsByLOGFONT
};
void
gdiinterop_init
(
struct
gdiinterop
*
interop
,
IDWriteFactory
3
*
factory
)
void
gdiinterop_init
(
struct
gdiinterop
*
interop
,
IDWriteFactory
4
*
factory
)
{
interop
->
IDWriteGdiInterop1_iface
.
lpVtbl
=
&
gdiinteropvtbl
;
/* Interop is a part of a factory, sharing its refcount.
...
...
dlls/dwrite/layout.c
View file @
988cf549
...
...
@@ -235,7 +235,7 @@ struct dwrite_textlayout {
IDWriteTextAnalysisSource1
IDWriteTextAnalysisSource1_iface
;
LONG
ref
;
IDWriteFactory
3
*
factory
;
IDWriteFactory
4
*
factory
;
WCHAR
*
str
;
UINT32
len
;
...
...
@@ -801,7 +801,7 @@ static HRESULT layout_compute_runs(struct dwrite_textlayout *layout)
IDWriteFontFallback_AddRef
(
fallback
);
}
else
{
hr
=
IDWriteFactory
3
_GetSystemFontFallback
(
layout
->
factory
,
&
fallback
);
hr
=
IDWriteFactory
4
_GetSystemFontFallback
(
layout
->
factory
,
&
fallback
);
if
(
FAILED
(
hr
))
return
hr
;
}
...
...
@@ -825,7 +825,7 @@ static HRESULT layout_compute_runs(struct dwrite_textlayout *layout)
IDWriteFontCollection_AddRef
(
collection
);
}
else
IDWriteFactory
3
_GetSystemFontCollection
(
layout
->
factory
,
FALSE
,
(
IDWriteFontCollection1
**
)
&
collection
,
FALSE
);
IDWriteFactory
4
_GetSystemFontCollection
(
layout
->
factory
,
FALSE
,
(
IDWriteFontCollection1
**
)
&
collection
,
FALSE
);
hr
=
create_matching_font
(
collection
,
range
->
fontfamily
,
range
->
weight
,
range
->
style
,
range
->
stretch
,
&
font
);
...
...
@@ -2653,7 +2653,7 @@ static ULONG WINAPI dwritetextlayout_Release(IDWriteTextLayout3 *iface)
TRACE
(
"(%p)->(%d)
\n
"
,
This
,
ref
);
if
(
!
ref
)
{
IDWriteFactory
3
_Release
(
This
->
factory
);
IDWriteFactory
4
_Release
(
This
->
factory
);
free_layout_ranges_list
(
This
);
free_layout_eruns
(
This
);
free_layout_runs
(
This
);
...
...
@@ -4617,7 +4617,7 @@ static HRESULT init_textlayout(const struct textlayout_desc *desc, struct dwrite
layout
->
transform
=
desc
->
transform
?
*
desc
->
transform
:
identity
;
layout
->
factory
=
desc
->
factory
;
IDWriteFactory
3
_AddRef
(
layout
->
factory
);
IDWriteFactory
4
_AddRef
(
layout
->
factory
);
list_add_head
(
&
layout
->
ranges
,
&
range
->
entry
);
list_add_head
(
&
layout
->
strike_ranges
,
&
strike
->
entry
);
list_add_head
(
&
layout
->
underline_ranges
,
&
underline
->
entry
);
...
...
@@ -4778,7 +4778,7 @@ static inline BOOL is_flow_direction_vert(DWRITE_FLOW_DIRECTION direction)
(
direction
==
DWRITE_FLOW_DIRECTION_BOTTOM_TO_TOP
);
}
HRESULT
create_trimmingsign
(
IDWriteFactory
3
*
factory
,
IDWriteTextFormat
*
format
,
IDWriteInlineObject
**
sign
)
HRESULT
create_trimmingsign
(
IDWriteFactory
4
*
factory
,
IDWriteTextFormat
*
format
,
IDWriteInlineObject
**
sign
)
{
static
const
WCHAR
ellipsisW
=
0x2026
;
struct
dwrite_trimmingsign
*
This
;
...
...
@@ -4804,7 +4804,7 @@ HRESULT create_trimmingsign(IDWriteFactory3 *factory, IDWriteTextFormat *format,
This
->
IDWriteInlineObject_iface
.
lpVtbl
=
&
dwritetrimmingsignvtbl
;
This
->
ref
=
1
;
hr
=
IDWriteFactory
3
_CreateTextLayout
(
factory
,
&
ellipsisW
,
1
,
format
,
0
.
0
f
,
0
.
0
f
,
&
This
->
layout
);
hr
=
IDWriteFactory
4
_CreateTextLayout
(
factory
,
&
ellipsisW
,
1
,
format
,
0
.
0
f
,
0
.
0
f
,
&
This
->
layout
);
if
(
FAILED
(
hr
))
{
heap_free
(
This
);
return
hr
;
...
...
dlls/dwrite/main.c
View file @
988cf549
...
...
@@ -33,8 +33,8 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
dwrite
);
static
IDWriteFactory
3
*
shared_factory
;
static
void
release_shared_factory
(
IDWriteFactory
3
*
);
static
IDWriteFactory
4
*
shared_factory
;
static
void
release_shared_factory
(
IDWriteFactory
4
*
);
BOOL
WINAPI
DllMain
(
HINSTANCE
hinstDLL
,
DWORD
reason
,
LPVOID
reserved
)
{
...
...
@@ -519,7 +519,7 @@ struct fileloader
};
struct
dwritefactory
{
IDWriteFactory
3
IDWriteFactory3
_iface
;
IDWriteFactory
4
IDWriteFactory4
_iface
;
LONG
ref
;
IDWriteFontCollection1
*
system_collection
;
...
...
@@ -534,9 +534,9 @@ struct dwritefactory {
struct
list
file_loaders
;
};
static
inline
struct
dwritefactory
*
impl_from_IDWriteFactory
3
(
IDWriteFactory3
*
iface
)
static
inline
struct
dwritefactory
*
impl_from_IDWriteFactory
4
(
IDWriteFactory4
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
dwritefactory
,
IDWriteFactory
3
_iface
);
return
CONTAINING_RECORD
(
iface
,
struct
dwritefactory
,
IDWriteFactory
4
_iface
);
}
static
void
release_fontface_cache
(
struct
list
*
fontfaces
)
...
...
@@ -584,11 +584,11 @@ static void release_dwritefactory(struct dwritefactory *factory)
heap_free
(
factory
);
}
static
void
release_shared_factory
(
IDWriteFactory
3
*
iface
)
static
void
release_shared_factory
(
IDWriteFactory
4
*
iface
)
{
struct
dwritefactory
*
factory
;
if
(
!
iface
)
return
;
factory
=
impl_from_IDWriteFactory
3
(
iface
);
factory
=
impl_from_IDWriteFactory
4
(
iface
);
release_dwritefactory
(
factory
);
}
...
...
@@ -620,20 +620,21 @@ static struct collectionloader *factory_get_collection_loader(struct dwritefacto
return
found
;
}
static
HRESULT
WINAPI
dwritefactory_QueryInterface
(
IDWriteFactory
3
*
iface
,
REFIID
riid
,
void
**
obj
)
static
HRESULT
WINAPI
dwritefactory_QueryInterface
(
IDWriteFactory
4
*
iface
,
REFIID
riid
,
void
**
obj
)
{
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
3
(
iface
);
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
4
(
iface
);
TRACE
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
obj
);
if
(
IsEqualIID
(
riid
,
&
IID_IDWriteFactory3
)
||
if
(
IsEqualIID
(
riid
,
&
IID_IDWriteFactory4
)
||
IsEqualIID
(
riid
,
&
IID_IDWriteFactory3
)
||
IsEqualIID
(
riid
,
&
IID_IDWriteFactory2
)
||
IsEqualIID
(
riid
,
&
IID_IDWriteFactory1
)
||
IsEqualIID
(
riid
,
&
IID_IDWriteFactory
)
||
IsEqualIID
(
riid
,
&
IID_IUnknown
))
{
*
obj
=
iface
;
IDWriteFactory
3
_AddRef
(
iface
);
IDWriteFactory
4
_AddRef
(
iface
);
return
S_OK
;
}
...
...
@@ -642,17 +643,17 @@ static HRESULT WINAPI dwritefactory_QueryInterface(IDWriteFactory3 *iface, REFII
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
dwritefactory_AddRef
(
IDWriteFactory
3
*
iface
)
static
ULONG
WINAPI
dwritefactory_AddRef
(
IDWriteFactory
4
*
iface
)
{
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
3
(
iface
);
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
4
(
iface
);
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(%d)
\n
"
,
This
,
ref
);
return
ref
;
}
static
ULONG
WINAPI
dwritefactory_Release
(
IDWriteFactory
3
*
iface
)
static
ULONG
WINAPI
dwritefactory_Release
(
IDWriteFactory
4
*
iface
)
{
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
3
(
iface
);
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
4
(
iface
);
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(%d)
\n
"
,
This
,
ref
);
...
...
@@ -663,16 +664,16 @@ static ULONG WINAPI dwritefactory_Release(IDWriteFactory3 *iface)
return
ref
;
}
static
HRESULT
WINAPI
dwritefactory_GetSystemFontCollection
(
IDWriteFactory
3
*
iface
,
static
HRESULT
WINAPI
dwritefactory_GetSystemFontCollection
(
IDWriteFactory
4
*
iface
,
IDWriteFontCollection
**
collection
,
BOOL
check_for_updates
)
{
return
IDWriteFactory
3
_GetSystemFontCollection
(
iface
,
FALSE
,
(
IDWriteFontCollection1
**
)
collection
,
check_for_updates
);
return
IDWriteFactory
4
_GetSystemFontCollection
(
iface
,
FALSE
,
(
IDWriteFontCollection1
**
)
collection
,
check_for_updates
);
}
static
HRESULT
WINAPI
dwritefactory_CreateCustomFontCollection
(
IDWriteFactory
3
*
iface
,
static
HRESULT
WINAPI
dwritefactory_CreateCustomFontCollection
(
IDWriteFactory
4
*
iface
,
IDWriteFontCollectionLoader
*
loader
,
void
const
*
key
,
UINT32
key_size
,
IDWriteFontCollection
**
collection
)
{
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
3
(
iface
);
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
4
(
iface
);
IDWriteFontFileEnumerator
*
enumerator
;
struct
collectionloader
*
found
;
HRESULT
hr
;
...
...
@@ -697,10 +698,10 @@ static HRESULT WINAPI dwritefactory_CreateCustomFontCollection(IDWriteFactory3 *
return
hr
;
}
static
HRESULT
WINAPI
dwritefactory_RegisterFontCollectionLoader
(
IDWriteFactory
3
*
iface
,
static
HRESULT
WINAPI
dwritefactory_RegisterFontCollectionLoader
(
IDWriteFactory
4
*
iface
,
IDWriteFontCollectionLoader
*
loader
)
{
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
3
(
iface
);
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
4
(
iface
);
struct
collectionloader
*
entry
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
loader
);
...
...
@@ -722,10 +723,10 @@ static HRESULT WINAPI dwritefactory_RegisterFontCollectionLoader(IDWriteFactory3
return
S_OK
;
}
static
HRESULT
WINAPI
dwritefactory_UnregisterFontCollectionLoader
(
IDWriteFactory
3
*
iface
,
static
HRESULT
WINAPI
dwritefactory_UnregisterFontCollectionLoader
(
IDWriteFactory
4
*
iface
,
IDWriteFontCollectionLoader
*
loader
)
{
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
3
(
iface
);
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
4
(
iface
);
struct
collectionloader
*
found
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
loader
);
...
...
@@ -744,10 +745,10 @@ static HRESULT WINAPI dwritefactory_UnregisterFontCollectionLoader(IDWriteFactor
return
S_OK
;
}
static
HRESULT
WINAPI
dwritefactory_CreateFontFileReference
(
IDWriteFactory
3
*
iface
,
static
HRESULT
WINAPI
dwritefactory_CreateFontFileReference
(
IDWriteFactory
4
*
iface
,
WCHAR
const
*
path
,
FILETIME
const
*
writetime
,
IDWriteFontFile
**
font_file
)
{
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
3
(
iface
);
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
4
(
iface
);
UINT32
key_size
;
HRESULT
hr
;
void
*
key
;
...
...
@@ -774,10 +775,10 @@ static HRESULT WINAPI dwritefactory_CreateFontFileReference(IDWriteFactory3 *ifa
return
hr
;
}
static
HRESULT
WINAPI
dwritefactory_CreateCustomFontFileReference
(
IDWriteFactory
3
*
iface
,
static
HRESULT
WINAPI
dwritefactory_CreateCustomFontFileReference
(
IDWriteFactory
4
*
iface
,
void
const
*
reference_key
,
UINT32
key_size
,
IDWriteFontFileLoader
*
loader
,
IDWriteFontFile
**
font_file
)
{
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
3
(
iface
);
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
4
(
iface
);
TRACE
(
"(%p)->(%p %u %p %p)
\n
"
,
This
,
reference_key
,
key_size
,
loader
,
font_file
);
...
...
@@ -791,10 +792,10 @@ static HRESULT WINAPI dwritefactory_CreateCustomFontFileReference(IDWriteFactory
return
create_font_file
(
loader
,
reference_key
,
key_size
,
font_file
);
}
HRESULT
factory_get_cached_fontface
(
IDWriteFactory
3
*
iface
,
IDWriteFontFile
*
const
*
font_files
,
HRESULT
factory_get_cached_fontface
(
IDWriteFactory
4
*
iface
,
IDWriteFontFile
*
const
*
font_files
,
UINT32
index
,
DWRITE_FONT_SIMULATIONS
simulations
,
IDWriteFontFace
**
font_face
,
struct
list
**
cached_list
)
{
struct
dwritefactory
*
factory
=
impl_from_IDWriteFactory
3
(
iface
);
struct
dwritefactory
*
factory
=
impl_from_IDWriteFactory
4
(
iface
);
struct
fontfacecached
*
cached
;
IDWriteFontFileLoader
*
loader
;
struct
list
*
fontfaces
;
...
...
@@ -873,11 +874,11 @@ void factory_cache_fontface(struct list *fontfaces, IDWriteFontFace3 *fontface)
list_add_tail
(
fontfaces
,
&
cached
->
entry
);
}
static
HRESULT
WINAPI
dwritefactory_CreateFontFace
(
IDWriteFactory
3
*
iface
,
static
HRESULT
WINAPI
dwritefactory_CreateFontFace
(
IDWriteFactory
4
*
iface
,
DWRITE_FONT_FACE_TYPE
req_facetype
,
UINT32
files_number
,
IDWriteFontFile
*
const
*
font_files
,
UINT32
index
,
DWRITE_FONT_SIMULATIONS
simulations
,
IDWriteFontFace
**
font_face
)
{
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
3
(
iface
);
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
4
(
iface
);
DWRITE_FONT_FILE_TYPE
file_type
;
DWRITE_FONT_FACE_TYPE
face_type
;
struct
fontface_desc
desc
;
...
...
@@ -939,9 +940,9 @@ static HRESULT WINAPI dwritefactory_CreateFontFace(IDWriteFactory3 *iface,
return
S_OK
;
}
static
HRESULT
WINAPI
dwritefactory_CreateRenderingParams
(
IDWriteFactory
3
*
iface
,
IDWriteRenderingParams
**
params
)
static
HRESULT
WINAPI
dwritefactory_CreateRenderingParams
(
IDWriteFactory
4
*
iface
,
IDWriteRenderingParams
**
params
)
{
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
3
(
iface
);
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
4
(
iface
);
HMONITOR
monitor
;
POINT
pt
;
...
...
@@ -949,13 +950,13 @@ static HRESULT WINAPI dwritefactory_CreateRenderingParams(IDWriteFactory3 *iface
pt
.
x
=
pt
.
y
=
0
;
monitor
=
MonitorFromPoint
(
pt
,
MONITOR_DEFAULTTOPRIMARY
);
return
IDWriteFactory
3
_CreateMonitorRenderingParams
(
iface
,
monitor
,
params
);
return
IDWriteFactory
4
_CreateMonitorRenderingParams
(
iface
,
monitor
,
params
);
}
static
HRESULT
WINAPI
dwritefactory_CreateMonitorRenderingParams
(
IDWriteFactory
3
*
iface
,
HMONITOR
monitor
,
static
HRESULT
WINAPI
dwritefactory_CreateMonitorRenderingParams
(
IDWriteFactory
4
*
iface
,
HMONITOR
monitor
,
IDWriteRenderingParams
**
params
)
{
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
3
(
iface
);
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
4
(
iface
);
IDWriteRenderingParams3
*
params3
;
static
int
fixme_once
=
0
;
HRESULT
hr
;
...
...
@@ -965,30 +966,30 @@ static HRESULT WINAPI dwritefactory_CreateMonitorRenderingParams(IDWriteFactory3
if
(
!
fixme_once
++
)
FIXME
(
"(%p): monitor setting ignored
\n
"
,
monitor
);
hr
=
IDWriteFactory
3
_CreateCustomRenderingParams
(
iface
,
0
.
0
f
,
0
.
0
f
,
1
.
0
f
,
0
.
0
f
,
DWRITE_PIXEL_GEOMETRY_FLAT
,
DWRITE_RENDERING_MODE_DEFAULT
,
hr
=
IDWriteFactory
4
_CreateCustomRenderingParams
(
iface
,
0
.
0
f
,
0
.
0
f
,
1
.
0
f
,
0
.
0
f
,
DWRITE_PIXEL_GEOMETRY_FLAT
,
DWRITE_RENDERING_MODE_DEFAULT
,
DWRITE_GRID_FIT_MODE_DEFAULT
,
&
params3
);
*
params
=
(
IDWriteRenderingParams
*
)
params3
;
return
hr
;
}
static
HRESULT
WINAPI
dwritefactory_CreateCustomRenderingParams
(
IDWriteFactory
3
*
iface
,
FLOAT
gamma
,
FLOAT
enhancedContrast
,
static
HRESULT
WINAPI
dwritefactory_CreateCustomRenderingParams
(
IDWriteFactory
4
*
iface
,
FLOAT
gamma
,
FLOAT
enhancedContrast
,
FLOAT
cleartype_level
,
DWRITE_PIXEL_GEOMETRY
geometry
,
DWRITE_RENDERING_MODE
mode
,
IDWriteRenderingParams
**
params
)
{
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
3
(
iface
);
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
4
(
iface
);
IDWriteRenderingParams3
*
params3
;
HRESULT
hr
;
TRACE
(
"(%p)->(%f %f %f %d %d %p)
\n
"
,
This
,
gamma
,
enhancedContrast
,
cleartype_level
,
geometry
,
mode
,
params
);
hr
=
IDWriteFactory
3
_CreateCustomRenderingParams
(
iface
,
gamma
,
enhancedContrast
,
1
.
0
f
,
cleartype_level
,
geometry
,
hr
=
IDWriteFactory
4
_CreateCustomRenderingParams
(
iface
,
gamma
,
enhancedContrast
,
1
.
0
f
,
cleartype_level
,
geometry
,
mode
,
DWRITE_GRID_FIT_MODE_DEFAULT
,
&
params3
);
*
params
=
(
IDWriteRenderingParams
*
)
params3
;
return
hr
;
}
static
HRESULT
WINAPI
dwritefactory_RegisterFontFileLoader
(
IDWriteFactory
3
*
iface
,
IDWriteFontFileLoader
*
loader
)
static
HRESULT
WINAPI
dwritefactory_RegisterFontFileLoader
(
IDWriteFactory
4
*
iface
,
IDWriteFontFileLoader
*
loader
)
{
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
3
(
iface
);
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
4
(
iface
);
struct
fileloader
*
entry
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
loader
);
...
...
@@ -1014,9 +1015,9 @@ static HRESULT WINAPI dwritefactory_RegisterFontFileLoader(IDWriteFactory3 *ifac
return
S_OK
;
}
static
HRESULT
WINAPI
dwritefactory_UnregisterFontFileLoader
(
IDWriteFactory
3
*
iface
,
IDWriteFontFileLoader
*
loader
)
static
HRESULT
WINAPI
dwritefactory_UnregisterFontFileLoader
(
IDWriteFactory
4
*
iface
,
IDWriteFontFileLoader
*
loader
)
{
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
3
(
iface
);
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
4
(
iface
);
struct
fileloader
*
found
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
loader
);
...
...
@@ -1035,11 +1036,11 @@ static HRESULT WINAPI dwritefactory_UnregisterFontFileLoader(IDWriteFactory3 *if
return
S_OK
;
}
static
HRESULT
WINAPI
dwritefactory_CreateTextFormat
(
IDWriteFactory
3
*
iface
,
WCHAR
const
*
family_name
,
static
HRESULT
WINAPI
dwritefactory_CreateTextFormat
(
IDWriteFactory
4
*
iface
,
WCHAR
const
*
family_name
,
IDWriteFontCollection
*
collection
,
DWRITE_FONT_WEIGHT
weight
,
DWRITE_FONT_STYLE
style
,
DWRITE_FONT_STRETCH
stretch
,
FLOAT
size
,
WCHAR
const
*
locale
,
IDWriteTextFormat
**
format
)
{
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
3
(
iface
);
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
4
(
iface
);
IDWriteFontCollection
*
syscollection
=
NULL
;
HRESULT
hr
;
...
...
@@ -1047,7 +1048,7 @@ static HRESULT WINAPI dwritefactory_CreateTextFormat(IDWriteFactory3 *iface, WCH
size
,
debugstr_w
(
locale
),
format
);
if
(
!
collection
)
{
hr
=
IDWriteFactory
3
_GetSystemFontCollection
(
iface
,
FALSE
,
(
IDWriteFontCollection1
**
)
&
syscollection
,
FALSE
);
hr
=
IDWriteFactory
4
_GetSystemFontCollection
(
iface
,
FALSE
,
(
IDWriteFontCollection1
**
)
&
syscollection
,
FALSE
);
if
(
FAILED
(
hr
))
return
hr
;
}
...
...
@@ -1058,16 +1059,16 @@ static HRESULT WINAPI dwritefactory_CreateTextFormat(IDWriteFactory3 *iface, WCH
return
hr
;
}
static
HRESULT
WINAPI
dwritefactory_CreateTypography
(
IDWriteFactory
3
*
iface
,
IDWriteTypography
**
typography
)
static
HRESULT
WINAPI
dwritefactory_CreateTypography
(
IDWriteFactory
4
*
iface
,
IDWriteTypography
**
typography
)
{
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
3
(
iface
);
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
4
(
iface
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
typography
);
return
create_typography
(
typography
);
}
static
HRESULT
WINAPI
dwritefactory_GetGdiInterop
(
IDWriteFactory
3
*
iface
,
IDWriteGdiInterop
**
gdi_interop
)
static
HRESULT
WINAPI
dwritefactory_GetGdiInterop
(
IDWriteFactory
4
*
iface
,
IDWriteGdiInterop
**
gdi_interop
)
{
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
3
(
iface
);
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
4
(
iface
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
gdi_interop
);
...
...
@@ -1076,10 +1077,10 @@ static HRESULT WINAPI dwritefactory_GetGdiInterop(IDWriteFactory3 *iface, IDWrit
return
S_OK
;
}
static
HRESULT
WINAPI
dwritefactory_CreateTextLayout
(
IDWriteFactory
3
*
iface
,
WCHAR
const
*
string
,
static
HRESULT
WINAPI
dwritefactory_CreateTextLayout
(
IDWriteFactory
4
*
iface
,
WCHAR
const
*
string
,
UINT32
length
,
IDWriteTextFormat
*
format
,
FLOAT
max_width
,
FLOAT
max_height
,
IDWriteTextLayout
**
layout
)
{
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
3
(
iface
);
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
4
(
iface
);
struct
textlayout_desc
desc
;
TRACE
(
"(%p)->(%s:%u %p %f %f %p)
\n
"
,
This
,
debugstr_wn
(
string
,
length
),
length
,
format
,
max_width
,
max_height
,
layout
);
...
...
@@ -1097,11 +1098,11 @@ static HRESULT WINAPI dwritefactory_CreateTextLayout(IDWriteFactory3 *iface, WCH
return
create_textlayout
(
&
desc
,
layout
);
}
static
HRESULT
WINAPI
dwritefactory_CreateGdiCompatibleTextLayout
(
IDWriteFactory
3
*
iface
,
WCHAR
const
*
string
,
static
HRESULT
WINAPI
dwritefactory_CreateGdiCompatibleTextLayout
(
IDWriteFactory
4
*
iface
,
WCHAR
const
*
string
,
UINT32
length
,
IDWriteTextFormat
*
format
,
FLOAT
max_width
,
FLOAT
max_height
,
FLOAT
pixels_per_dip
,
DWRITE_MATRIX
const
*
transform
,
BOOL
use_gdi_natural
,
IDWriteTextLayout
**
layout
)
{
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
3
(
iface
);
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
4
(
iface
);
struct
textlayout_desc
desc
;
TRACE
(
"(%p)->(%s:%u %p %f %f %f %p %d %p)
\n
"
,
This
,
debugstr_wn
(
string
,
length
),
length
,
format
,
max_width
,
max_height
,
...
...
@@ -1120,34 +1121,34 @@ static HRESULT WINAPI dwritefactory_CreateGdiCompatibleTextLayout(IDWriteFactory
return
create_textlayout
(
&
desc
,
layout
);
}
static
HRESULT
WINAPI
dwritefactory_CreateEllipsisTrimmingSign
(
IDWriteFactory
3
*
iface
,
IDWriteTextFormat
*
format
,
static
HRESULT
WINAPI
dwritefactory_CreateEllipsisTrimmingSign
(
IDWriteFactory
4
*
iface
,
IDWriteTextFormat
*
format
,
IDWriteInlineObject
**
trimming_sign
)
{
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
3
(
iface
);
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
4
(
iface
);
TRACE
(
"(%p)->(%p %p)
\n
"
,
This
,
format
,
trimming_sign
);
return
create_trimmingsign
(
iface
,
format
,
trimming_sign
);
}
static
HRESULT
WINAPI
dwritefactory_CreateTextAnalyzer
(
IDWriteFactory
3
*
iface
,
IDWriteTextAnalyzer
**
analyzer
)
static
HRESULT
WINAPI
dwritefactory_CreateTextAnalyzer
(
IDWriteFactory
4
*
iface
,
IDWriteTextAnalyzer
**
analyzer
)
{
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
3
(
iface
);
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
4
(
iface
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
analyzer
);
return
get_textanalyzer
(
analyzer
);
}
static
HRESULT
WINAPI
dwritefactory_CreateNumberSubstitution
(
IDWriteFactory
3
*
iface
,
DWRITE_NUMBER_SUBSTITUTION_METHOD
method
,
static
HRESULT
WINAPI
dwritefactory_CreateNumberSubstitution
(
IDWriteFactory
4
*
iface
,
DWRITE_NUMBER_SUBSTITUTION_METHOD
method
,
WCHAR
const
*
locale
,
BOOL
ignore_user_override
,
IDWriteNumberSubstitution
**
substitution
)
{
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
3
(
iface
);
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
4
(
iface
);
TRACE
(
"(%p)->(%d %s %d %p)
\n
"
,
This
,
method
,
debugstr_w
(
locale
),
ignore_user_override
,
substitution
);
return
create_numbersubstitution
(
method
,
locale
,
ignore_user_override
,
substitution
);
}
static
HRESULT
WINAPI
dwritefactory_CreateGlyphRunAnalysis
(
IDWriteFactory
3
*
iface
,
DWRITE_GLYPH_RUN
const
*
run
,
static
HRESULT
WINAPI
dwritefactory_CreateGlyphRunAnalysis
(
IDWriteFactory
4
*
iface
,
DWRITE_GLYPH_RUN
const
*
run
,
FLOAT
ppdip
,
DWRITE_MATRIX
const
*
transform
,
DWRITE_RENDERING_MODE
rendering_mode
,
DWRITE_MEASURING_MODE
measuring_mode
,
FLOAT
originX
,
FLOAT
originY
,
IDWriteGlyphRunAnalysis
**
analysis
)
{
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
3
(
iface
);
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
4
(
iface
);
struct
glyphrunanalysis_desc
desc
;
TRACE
(
"(%p)->(%p %.2f %p %d %d %.2f %.2f %p)
\n
"
,
This
,
run
,
ppdip
,
transform
,
rendering_mode
,
...
...
@@ -1170,10 +1171,10 @@ static HRESULT WINAPI dwritefactory_CreateGlyphRunAnalysis(IDWriteFactory3 *ifac
return
create_glyphrunanalysis
(
&
desc
,
analysis
);
}
static
HRESULT
WINAPI
dwritefactory1_GetEudcFontCollection
(
IDWriteFactory
3
*
iface
,
IDWriteFontCollection
**
collection
,
static
HRESULT
WINAPI
dwritefactory1_GetEudcFontCollection
(
IDWriteFactory
4
*
iface
,
IDWriteFontCollection
**
collection
,
BOOL
check_for_updates
)
{
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
3
(
iface
);
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
4
(
iface
);
HRESULT
hr
=
S_OK
;
TRACE
(
"(%p)->(%p %d)
\n
"
,
This
,
collection
,
check_for_updates
);
...
...
@@ -1192,25 +1193,25 @@ static HRESULT WINAPI dwritefactory1_GetEudcFontCollection(IDWriteFactory3 *ifac
return
hr
;
}
static
HRESULT
WINAPI
dwritefactory1_CreateCustomRenderingParams
(
IDWriteFactory
3
*
iface
,
FLOAT
gamma
,
static
HRESULT
WINAPI
dwritefactory1_CreateCustomRenderingParams
(
IDWriteFactory
4
*
iface
,
FLOAT
gamma
,
FLOAT
enhcontrast
,
FLOAT
enhcontrast_grayscale
,
FLOAT
cleartype_level
,
DWRITE_PIXEL_GEOMETRY
geometry
,
DWRITE_RENDERING_MODE
mode
,
IDWriteRenderingParams1
**
params
)
{
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
3
(
iface
);
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
4
(
iface
);
IDWriteRenderingParams3
*
params3
;
HRESULT
hr
;
TRACE
(
"(%p)->(%.2f %.2f %.2f %.2f %d %d %p)
\n
"
,
This
,
gamma
,
enhcontrast
,
enhcontrast_grayscale
,
cleartype_level
,
geometry
,
mode
,
params
);
hr
=
IDWriteFactory
3
_CreateCustomRenderingParams
(
iface
,
gamma
,
enhcontrast
,
enhcontrast_grayscale
,
hr
=
IDWriteFactory
4
_CreateCustomRenderingParams
(
iface
,
gamma
,
enhcontrast
,
enhcontrast_grayscale
,
cleartype_level
,
geometry
,
mode
,
DWRITE_GRID_FIT_MODE_DEFAULT
,
&
params3
);
*
params
=
(
IDWriteRenderingParams1
*
)
params3
;
return
hr
;
}
static
HRESULT
WINAPI
dwritefactory2_GetSystemFontFallback
(
IDWriteFactory
3
*
iface
,
IDWriteFontFallback
**
fallback
)
static
HRESULT
WINAPI
dwritefactory2_GetSystemFontFallback
(
IDWriteFactory
4
*
iface
,
IDWriteFontFallback
**
fallback
)
{
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
3
(
iface
);
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
4
(
iface
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
fallback
);
...
...
@@ -1227,46 +1228,46 @@ static HRESULT WINAPI dwritefactory2_GetSystemFontFallback(IDWriteFactory3 *ifac
return
S_OK
;
}
static
HRESULT
WINAPI
dwritefactory2_CreateFontFallbackBuilder
(
IDWriteFactory
3
*
iface
,
IDWriteFontFallbackBuilder
**
fallbackbuilder
)
static
HRESULT
WINAPI
dwritefactory2_CreateFontFallbackBuilder
(
IDWriteFactory
4
*
iface
,
IDWriteFontFallbackBuilder
**
fallbackbuilder
)
{
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
3
(
iface
);
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
4
(
iface
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
fallbackbuilder
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
dwritefactory2_TranslateColorGlyphRun
(
IDWriteFactory
3
*
iface
,
FLOAT
originX
,
FLOAT
originY
,
static
HRESULT
WINAPI
dwritefactory2_TranslateColorGlyphRun
(
IDWriteFactory
4
*
iface
,
FLOAT
originX
,
FLOAT
originY
,
const
DWRITE_GLYPH_RUN
*
run
,
const
DWRITE_GLYPH_RUN_DESCRIPTION
*
rundescr
,
DWRITE_MEASURING_MODE
mode
,
const
DWRITE_MATRIX
*
transform
,
UINT32
palette
,
IDWriteColorGlyphRunEnumerator
**
colorlayers
)
{
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
3
(
iface
);
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
4
(
iface
);
TRACE
(
"(%p)->(%.2f %.2f %p %p %d %p %u %p)
\n
"
,
This
,
originX
,
originY
,
run
,
rundescr
,
mode
,
transform
,
palette
,
colorlayers
);
return
create_colorglyphenum
(
originX
,
originY
,
run
,
rundescr
,
mode
,
transform
,
palette
,
colorlayers
);
}
static
HRESULT
WINAPI
dwritefactory2_CreateCustomRenderingParams
(
IDWriteFactory
3
*
iface
,
FLOAT
gamma
,
FLOAT
contrast
,
static
HRESULT
WINAPI
dwritefactory2_CreateCustomRenderingParams
(
IDWriteFactory
4
*
iface
,
FLOAT
gamma
,
FLOAT
contrast
,
FLOAT
grayscalecontrast
,
FLOAT
cleartype_level
,
DWRITE_PIXEL_GEOMETRY
geometry
,
DWRITE_RENDERING_MODE
mode
,
DWRITE_GRID_FIT_MODE
gridfit
,
IDWriteRenderingParams2
**
params
)
{
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
3
(
iface
);
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
4
(
iface
);
IDWriteRenderingParams3
*
params3
;
HRESULT
hr
;
TRACE
(
"(%p)->(%.2f %.2f %.2f %.2f %d %d %d %p)
\n
"
,
This
,
gamma
,
contrast
,
grayscalecontrast
,
cleartype_level
,
geometry
,
mode
,
gridfit
,
params
);
hr
=
IDWriteFactory
3
_CreateCustomRenderingParams
(
iface
,
gamma
,
contrast
,
grayscalecontrast
,
hr
=
IDWriteFactory
4
_CreateCustomRenderingParams
(
iface
,
gamma
,
contrast
,
grayscalecontrast
,
cleartype_level
,
geometry
,
mode
,
DWRITE_GRID_FIT_MODE_DEFAULT
,
&
params3
);
*
params
=
(
IDWriteRenderingParams2
*
)
params3
;
return
hr
;
}
static
HRESULT
WINAPI
dwritefactory2_CreateGlyphRunAnalysis
(
IDWriteFactory
3
*
iface
,
const
DWRITE_GLYPH_RUN
*
run
,
static
HRESULT
WINAPI
dwritefactory2_CreateGlyphRunAnalysis
(
IDWriteFactory
4
*
iface
,
const
DWRITE_GLYPH_RUN
*
run
,
const
DWRITE_MATRIX
*
transform
,
DWRITE_RENDERING_MODE
rendering_mode
,
DWRITE_MEASURING_MODE
measuring_mode
,
DWRITE_GRID_FIT_MODE
gridfit_mode
,
DWRITE_TEXT_ANTIALIAS_MODE
aa_mode
,
FLOAT
originX
,
FLOAT
originY
,
IDWriteGlyphRunAnalysis
**
analysis
)
{
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
3
(
iface
);
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
4
(
iface
);
struct
glyphrunanalysis_desc
desc
;
TRACE
(
"(%p)->(%p %p %d %d %d %d %.2f %.2f %p)
\n
"
,
This
,
run
,
transform
,
rendering_mode
,
measuring_mode
,
...
...
@@ -1284,12 +1285,12 @@ static HRESULT WINAPI dwritefactory2_CreateGlyphRunAnalysis(IDWriteFactory3 *ifa
return
create_glyphrunanalysis
(
&
desc
,
analysis
);
}
static
HRESULT
WINAPI
dwritefactory3_CreateGlyphRunAnalysis
(
IDWriteFactory
3
*
iface
,
DWRITE_GLYPH_RUN
const
*
run
,
static
HRESULT
WINAPI
dwritefactory3_CreateGlyphRunAnalysis
(
IDWriteFactory
4
*
iface
,
DWRITE_GLYPH_RUN
const
*
run
,
DWRITE_MATRIX
const
*
transform
,
DWRITE_RENDERING_MODE1
rendering_mode
,
DWRITE_MEASURING_MODE
measuring_mode
,
DWRITE_GRID_FIT_MODE
gridfit_mode
,
DWRITE_TEXT_ANTIALIAS_MODE
aa_mode
,
FLOAT
originX
,
FLOAT
originY
,
IDWriteGlyphRunAnalysis
**
analysis
)
{
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
3
(
iface
);
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
4
(
iface
);
FIXME
(
"(%p)->(%p %p %d %d %d %d %.2f %.2f %p): stub
\n
"
,
This
,
run
,
transform
,
rendering_mode
,
measuring_mode
,
gridfit_mode
,
aa_mode
,
originX
,
originY
,
analysis
);
...
...
@@ -1297,11 +1298,11 @@ static HRESULT WINAPI dwritefactory3_CreateGlyphRunAnalysis(IDWriteFactory3 *ifa
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
dwritefactory3_CreateCustomRenderingParams
(
IDWriteFactory
3
*
iface
,
FLOAT
gamma
,
FLOAT
contrast
,
static
HRESULT
WINAPI
dwritefactory3_CreateCustomRenderingParams
(
IDWriteFactory
4
*
iface
,
FLOAT
gamma
,
FLOAT
contrast
,
FLOAT
grayscale_contrast
,
FLOAT
cleartype_level
,
DWRITE_PIXEL_GEOMETRY
pixel_geometry
,
DWRITE_RENDERING_MODE1
rendering_mode
,
DWRITE_GRID_FIT_MODE
gridfit_mode
,
IDWriteRenderingParams3
**
params
)
{
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
3
(
iface
);
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
4
(
iface
);
TRACE
(
"(%p)->(%.2f %.2f %.2f %.2f %d %d %d %p)
\n
"
,
This
,
gamma
,
contrast
,
grayscale_contrast
,
cleartype_level
,
pixel_geometry
,
rendering_mode
,
gridfit_mode
,
params
);
...
...
@@ -1310,68 +1311,68 @@ static HRESULT WINAPI dwritefactory3_CreateCustomRenderingParams(IDWriteFactory3
gridfit_mode
,
params
);
}
static
HRESULT
WINAPI
dwritefactory3_CreateFontFaceReference_
(
IDWriteFactory
3
*
iface
,
IDWriteFontFile
*
file
,
UINT32
index
,
static
HRESULT
WINAPI
dwritefactory3_CreateFontFaceReference_
(
IDWriteFactory
4
*
iface
,
IDWriteFontFile
*
file
,
UINT32
index
,
DWRITE_FONT_SIMULATIONS
simulations
,
IDWriteFontFaceReference
**
reference
)
{
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
3
(
iface
);
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
4
(
iface
);
TRACE
(
"(%p)->(%p %u %x %p)
\n
"
,
This
,
file
,
index
,
simulations
,
reference
);
return
create_fontfacereference
(
iface
,
file
,
index
,
simulations
,
reference
);
}
static
HRESULT
WINAPI
dwritefactory3_CreateFontFaceReference
(
IDWriteFactory
3
*
iface
,
WCHAR
const
*
path
,
FILETIME
const
*
writetime
,
static
HRESULT
WINAPI
dwritefactory3_CreateFontFaceReference
(
IDWriteFactory
4
*
iface
,
WCHAR
const
*
path
,
FILETIME
const
*
writetime
,
UINT32
index
,
DWRITE_FONT_SIMULATIONS
simulations
,
IDWriteFontFaceReference
**
reference
)
{
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
3
(
iface
);
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
4
(
iface
);
IDWriteFontFile
*
file
;
HRESULT
hr
;
TRACE
(
"(%p)->(%s %p %u %x, %p)
\n
"
,
This
,
debugstr_w
(
path
),
writetime
,
index
,
simulations
,
reference
);
hr
=
IDWriteFactory
3
_CreateFontFileReference
(
iface
,
path
,
writetime
,
&
file
);
hr
=
IDWriteFactory
4
_CreateFontFileReference
(
iface
,
path
,
writetime
,
&
file
);
if
(
FAILED
(
hr
))
{
*
reference
=
NULL
;
return
hr
;
}
hr
=
IDWriteFactory
3
_CreateFontFaceReference_
(
iface
,
file
,
index
,
simulations
,
reference
);
hr
=
IDWriteFactory
4
_CreateFontFaceReference_
(
iface
,
file
,
index
,
simulations
,
reference
);
IDWriteFontFile_Release
(
file
);
return
hr
;
}
static
HRESULT
WINAPI
dwritefactory3_GetSystemFontSet
(
IDWriteFactory
3
*
iface
,
IDWriteFontSet
**
fontset
)
static
HRESULT
WINAPI
dwritefactory3_GetSystemFontSet
(
IDWriteFactory
4
*
iface
,
IDWriteFontSet
**
fontset
)
{
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
3
(
iface
);
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
4
(
iface
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
fontset
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
dwritefactory3_CreateFontSetBuilder
(
IDWriteFactory
3
*
iface
,
IDWriteFontSetBuilder
**
builder
)
static
HRESULT
WINAPI
dwritefactory3_CreateFontSetBuilder
(
IDWriteFactory
4
*
iface
,
IDWriteFontSetBuilder
**
builder
)
{
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
3
(
iface
);
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
4
(
iface
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
builder
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
dwritefactory3_CreateFontCollectionFromFontSet
(
IDWriteFactory
3
*
iface
,
IDWriteFontSet
*
fontset
,
static
HRESULT
WINAPI
dwritefactory3_CreateFontCollectionFromFontSet
(
IDWriteFactory
4
*
iface
,
IDWriteFontSet
*
fontset
,
IDWriteFontCollection1
**
collection
)
{
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
3
(
iface
);
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
4
(
iface
);
FIXME
(
"(%p)->(%p %p): stub
\n
"
,
This
,
fontset
,
collection
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
dwritefactory3_GetSystemFontCollection
(
IDWriteFactory
3
*
iface
,
BOOL
include_downloadable
,
static
HRESULT
WINAPI
dwritefactory3_GetSystemFontCollection
(
IDWriteFactory
4
*
iface
,
BOOL
include_downloadable
,
IDWriteFontCollection1
**
collection
,
BOOL
check_for_updates
)
{
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
3
(
iface
);
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
4
(
iface
);
HRESULT
hr
=
S_OK
;
TRACE
(
"(%p)->(%d %p %d)
\n
"
,
This
,
include_downloadable
,
collection
,
check_for_updates
);
...
...
@@ -1393,16 +1394,49 @@ static HRESULT WINAPI dwritefactory3_GetSystemFontCollection(IDWriteFactory3 *if
return
hr
;
}
static
HRESULT
WINAPI
dwritefactory3_GetFontDownloadQueue
(
IDWriteFactory
3
*
iface
,
IDWriteFontDownloadQueue
**
queue
)
static
HRESULT
WINAPI
dwritefactory3_GetFontDownloadQueue
(
IDWriteFactory
4
*
iface
,
IDWriteFontDownloadQueue
**
queue
)
{
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
3
(
iface
);
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
4
(
iface
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
queue
);
return
E_NOTIMPL
;
}
static
const
struct
IDWriteFactory3Vtbl
dwritefactoryvtbl
=
{
static
HRESULT
WINAPI
dwritefactory4_TranslateColorGlyphRun
(
IDWriteFactory4
*
iface
,
D2D1_POINT_2F
baseline_origin
,
DWRITE_GLYPH_RUN
const
*
run
,
DWRITE_GLYPH_RUN_DESCRIPTION
const
*
run_desc
,
DWRITE_GLYPH_IMAGE_FORMATS
desired_formats
,
DWRITE_MEASURING_MODE
measuring_mode
,
DWRITE_MATRIX
const
*
transform
,
UINT32
palette
,
IDWriteColorGlyphRunEnumerator1
**
layers
)
{
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory4
(
iface
);
FIXME
(
"(%p)->(%p %p %u %d %p %u %p): stub
\n
"
,
This
,
run
,
run_desc
,
desired_formats
,
measuring_mode
,
transform
,
palette
,
layers
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
dwritefactory4_ComputeGlyphOrigins_
(
IDWriteFactory4
*
iface
,
DWRITE_GLYPH_RUN
const
*
run
,
D2D1_POINT_2F
baseline_origin
,
D2D1_POINT_2F
*
origins
)
{
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory4
(
iface
);
FIXME
(
"(%p)->(%p %p): stub
\n
"
,
This
,
run
,
origins
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
dwritefactory4_ComputeGlyphOrigins
(
IDWriteFactory4
*
iface
,
DWRITE_GLYPH_RUN
const
*
run
,
DWRITE_MEASURING_MODE
measuring_mode
,
D2D1_POINT_2F
baseline_origin
,
DWRITE_MATRIX
const
*
transform
,
D2D1_POINT_2F
*
origins
)
{
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory4
(
iface
);
FIXME
(
"(%p)->(%p %d %p %p): stub
\n
"
,
This
,
run
,
measuring_mode
,
transform
,
origins
);
return
E_NOTIMPL
;
}
static
const
struct
IDWriteFactory4Vtbl
dwritefactoryvtbl
=
{
dwritefactory_QueryInterface
,
dwritefactory_AddRef
,
dwritefactory_Release
,
...
...
@@ -1442,24 +1476,27 @@ static const struct IDWriteFactory3Vtbl dwritefactoryvtbl = {
dwritefactory3_CreateFontSetBuilder
,
dwritefactory3_CreateFontCollectionFromFontSet
,
dwritefactory3_GetSystemFontCollection
,
dwritefactory3_GetFontDownloadQueue
dwritefactory3_GetFontDownloadQueue
,
dwritefactory4_TranslateColorGlyphRun
,
dwritefactory4_ComputeGlyphOrigins_
,
dwritefactory4_ComputeGlyphOrigins
};
static
ULONG
WINAPI
shareddwritefactory_AddRef
(
IDWriteFactory
3
*
iface
)
static
ULONG
WINAPI
shareddwritefactory_AddRef
(
IDWriteFactory
4
*
iface
)
{
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
3
(
iface
);
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
4
(
iface
);
TRACE
(
"(%p)
\n
"
,
This
);
return
2
;
}
static
ULONG
WINAPI
shareddwritefactory_Release
(
IDWriteFactory
3
*
iface
)
static
ULONG
WINAPI
shareddwritefactory_Release
(
IDWriteFactory
4
*
iface
)
{
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
3
(
iface
);
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
4
(
iface
);
TRACE
(
"(%p)
\n
"
,
This
);
return
1
;
}
static
const
struct
IDWriteFactory
3
Vtbl
shareddwritefactoryvtbl
=
{
static
const
struct
IDWriteFactory
4
Vtbl
shareddwritefactoryvtbl
=
{
dwritefactory_QueryInterface
,
shareddwritefactory_AddRef
,
shareddwritefactory_Release
,
...
...
@@ -1504,12 +1541,12 @@ static const struct IDWriteFactory3Vtbl shareddwritefactoryvtbl = {
static
void
init_dwritefactory
(
struct
dwritefactory
*
factory
,
DWRITE_FACTORY_TYPE
type
)
{
factory
->
IDWriteFactory
3
_iface
.
lpVtbl
=
type
==
DWRITE_FACTORY_TYPE_SHARED
?
&
shareddwritefactoryvtbl
:
&
dwritefactoryvtbl
;
factory
->
IDWriteFactory
4
_iface
.
lpVtbl
=
type
==
DWRITE_FACTORY_TYPE_SHARED
?
&
shareddwritefactoryvtbl
:
&
dwritefactoryvtbl
;
factory
->
ref
=
1
;
factory
->
localfontfileloader
=
NULL
;
factory
->
system_collection
=
NULL
;
factory
->
eudc_collection
=
NULL
;
gdiinterop_init
(
&
factory
->
interop
,
&
factory
->
IDWriteFactory
3
_iface
);
gdiinterop_init
(
&
factory
->
interop
,
&
factory
->
IDWriteFactory
4
_iface
);
factory
->
fallback
=
NULL
;
list_init
(
&
factory
->
collection_loaders
);
...
...
@@ -1527,7 +1564,7 @@ HRESULT WINAPI DWriteCreateFactory(DWRITE_FACTORY_TYPE type, REFIID riid, IUnkno
*
ret
=
NULL
;
if
(
type
==
DWRITE_FACTORY_TYPE_SHARED
&&
shared_factory
)
return
IDWriteFactory
3
_QueryInterface
(
shared_factory
,
riid
,
(
void
**
)
ret
);
return
IDWriteFactory
4
_QueryInterface
(
shared_factory
,
riid
,
(
void
**
)
ret
);
factory
=
heap_alloc
(
sizeof
(
struct
dwritefactory
));
if
(
!
factory
)
return
E_OUTOFMEMORY
;
...
...
@@ -1535,12 +1572,12 @@ HRESULT WINAPI DWriteCreateFactory(DWRITE_FACTORY_TYPE type, REFIID riid, IUnkno
init_dwritefactory
(
factory
,
type
);
if
(
type
==
DWRITE_FACTORY_TYPE_SHARED
)
if
(
InterlockedCompareExchangePointer
((
void
**
)
&
shared_factory
,
&
factory
->
IDWriteFactory
3
_iface
,
NULL
))
{
release_shared_factory
(
&
factory
->
IDWriteFactory
3
_iface
);
return
IDWriteFactory
3
_QueryInterface
(
shared_factory
,
riid
,
(
void
**
)
ret
);
if
(
InterlockedCompareExchangePointer
((
void
**
)
&
shared_factory
,
&
factory
->
IDWriteFactory
4
_iface
,
NULL
))
{
release_shared_factory
(
&
factory
->
IDWriteFactory
4
_iface
);
return
IDWriteFactory
4
_QueryInterface
(
shared_factory
,
riid
,
(
void
**
)
ret
);
}
hr
=
IDWriteFactory
3_QueryInterface
(
&
factory
->
IDWriteFactory3
_iface
,
riid
,
(
void
**
)
ret
);
IDWriteFactory
3_Release
(
&
factory
->
IDWriteFactory3
_iface
);
hr
=
IDWriteFactory
4_QueryInterface
(
&
factory
->
IDWriteFactory4
_iface
,
riid
,
(
void
**
)
ret
);
IDWriteFactory
4_Release
(
&
factory
->
IDWriteFactory4
_iface
);
return
hr
;
}
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