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
2c0c4132
Commit
2c0c4132
authored
Oct 12, 2012
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 12, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Store text format properties.
parent
0358413e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
4 deletions
+28
-4
dwrite_private.h
dlls/dwrite/dwrite_private.h
+2
-1
layout.c
dlls/dwrite/layout.c
+20
-1
main.c
dlls/dwrite/main.c
+6
-2
No files found.
dlls/dwrite/dwrite_private.h
View file @
2c0c4132
...
...
@@ -54,7 +54,8 @@ static inline LPWSTR heap_strdupW(LPCWSTR str)
}
extern
HRESULT
create_font_from_logfont
(
const
LOGFONTW
*
,
IDWriteFont
**
)
DECLSPEC_HIDDEN
;
extern
HRESULT
create_textformat
(
IDWriteTextFormat
**
)
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
(
IDWriteTextLayout
**
)
DECLSPEC_HIDDEN
;
extern
HRESULT
create_gdiinterop
(
IDWriteGdiInterop
**
)
DECLSPEC_HIDDEN
;
extern
HRESULT
create_localizedstrings
(
IDWriteLocalizedStrings
**
)
DECLSPEC_HIDDEN
;
...
...
dlls/dwrite/layout.c
View file @
2c0c4132
...
...
@@ -40,6 +40,15 @@ struct dwrite_textlayout {
struct
dwrite_textformat
{
IDWriteTextFormat
IDWriteTextFormat_iface
;
LONG
ref
;
WCHAR
*
family_name
;
WCHAR
*
locale
;
DWRITE_FONT_WEIGHT
weight
;
DWRITE_FONT_STYLE
style
;
DWRITE_FONT_STRETCH
stretch
;
FLOAT
size
;
};
static
inline
struct
dwrite_textlayout
*
impl_from_IDWriteTextLayout
(
IDWriteTextLayout
*
iface
)
...
...
@@ -689,7 +698,11 @@ static ULONG WINAPI dwritetextformat_Release(IDWriteTextFormat *iface)
TRACE
(
"(%p)->(%d)
\n
"
,
This
,
ref
);
if
(
!
ref
)
{
heap_free
(
This
->
family_name
);
heap_free
(
This
->
locale
);
heap_free
(
This
);
}
return
S_OK
;
}
...
...
@@ -904,7 +917,8 @@ static const IDWriteTextFormatVtbl dwritetextformatvtbl = {
dwritetextformat_GetLocaleName
};
HRESULT
create_textformat
(
IDWriteTextFormat
**
format
)
HRESULT
create_textformat
(
const
WCHAR
*
family_name
,
DWRITE_FONT_WEIGHT
weight
,
DWRITE_FONT_STYLE
style
,
DWRITE_FONT_STRETCH
stretch
,
FLOAT
size
,
const
WCHAR
*
locale
,
IDWriteTextFormat
**
format
)
{
struct
dwrite_textformat
*
This
;
...
...
@@ -913,6 +927,11 @@ HRESULT create_textformat(IDWriteTextFormat **format)
This
->
IDWriteTextFormat_iface
.
lpVtbl
=
&
dwritetextformatvtbl
;
This
->
ref
=
1
;
This
->
family_name
=
heap_strdupW
(
family_name
);
This
->
locale
=
heap_strdupW
(
locale
);
This
->
weight
=
weight
;
This
->
style
=
style
;
This
->
size
=
size
;
*
format
=
&
This
->
IDWriteTextFormat_iface
;
...
...
dlls/dwrite/main.c
View file @
2c0c4132
...
...
@@ -479,9 +479,13 @@ static HRESULT WINAPI dwritefactory_CreateTextFormat(IDWriteFactory *iface, WCHA
IDWriteFontCollection
*
collection
,
DWRITE_FONT_WEIGHT
weight
,
DWRITE_FONT_STYLE
style
,
DWRITE_FONT_STRETCH
stretch
,
FLOAT
size
,
WCHAR
const
*
locale
,
IDWriteTextFormat
**
format
)
{
FIXME
(
"(%s %p %d %d %d %f %s %p): semi-stub
\n
"
,
debugstr_w
(
family_name
),
collection
,
weight
,
style
,
stretch
,
TRACE
(
"(%s %p %d %d %d %f %s %p)
\n
"
,
debugstr_w
(
family_name
),
collection
,
weight
,
style
,
stretch
,
size
,
debugstr_w
(
locale
),
format
);
return
create_textformat
(
format
);
if
(
collection
)
FIXME
(
"font collection not supported
\n
"
);
return
create_textformat
(
family_name
,
weight
,
style
,
stretch
,
size
,
locale
,
format
);
}
static
HRESULT
WINAPI
dwritefactory_CreateTypography
(
IDWriteFactory
*
iface
,
IDWriteTypography
**
typography
)
...
...
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