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
002b7c82
Commit
002b7c82
authored
Jun 26, 2008
by
Joris Huizer
Committed by
Alexandre Julliard
Jun 27, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Change tmw field of GpFontFamily into an embedded structure.
parent
4cafd76f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
8 deletions
+4
-8
font.c
dlls/gdiplus/font.c
+3
-7
gdiplus_private.h
dlls/gdiplus/gdiplus_private.h
+1
-1
No files found.
dlls/gdiplus/font.c
View file @
002b7c82
...
...
@@ -94,7 +94,7 @@ GpStatus WINGDIPAPI GdipCreateFont(GDIPCONST GpFontFamily *fontFamily,
{
WCHAR
facename
[
LF_FACESIZE
];
LOGFONTW
*
lfw
;
TEXTMETRICW
*
tmw
;
const
TEXTMETRICW
*
tmw
;
GpStatus
stat
;
if
((
!
fontFamily
&&
fontFamily
->
FamilyName
&&
font
))
...
...
@@ -107,7 +107,7 @@ GpStatus WINGDIPAPI GdipCreateFont(GDIPCONST GpFontFamily *fontFamily,
if
(
stat
!=
Ok
)
return
stat
;
*
font
=
GdipAlloc
(
sizeof
(
GpFont
));
tmw
=
fontFamily
->
tmw
;
tmw
=
&
fontFamily
->
tmw
;
lfw
=
&
((
*
font
)
->
lfw
);
ZeroMemory
(
&
(
*
lfw
),
sizeof
(
*
lfw
));
...
...
@@ -366,21 +366,18 @@ GpStatus WINGDIPAPI GdipCreateFontFamilyFromName(GDIPCONST WCHAR *name,
ffamily
=
GdipAlloc
(
sizeof
(
GpFontFamily
));
if
(
!
ffamily
)
return
OutOfMemory
;
ffamily
->
tmw
=
GdipAlloc
(
sizeof
(
TEXTMETRICW
));
if
(
!
ffamily
->
tmw
)
{
GdipFree
(
ffamily
);
return
OutOfMemory
;}
hdc
=
GetDC
(
0
);
lstrcpynW
(
lfw
.
lfFaceName
,
name
,
sizeof
(
WCHAR
)
*
LF_FACESIZE
);
hFont
=
CreateFontIndirectW
(
&
lfw
);
hfont_old
=
SelectObject
(
hdc
,
hFont
);
GetTextMetricsW
(
hdc
,
ffamily
->
tmw
);
GetTextMetricsW
(
hdc
,
&
ffamily
->
tmw
);
DeleteObject
(
SelectObject
(
hdc
,
hfont_old
));
ffamily
->
FamilyName
=
GdipAlloc
(
LF_FACESIZE
*
sizeof
(
WCHAR
));
if
(
!
ffamily
->
FamilyName
)
{
GdipFree
(
ffamily
->
tmw
);
GdipFree
(
ffamily
);
ReleaseDC
(
0
,
hdc
);
return
OutOfMemory
;
...
...
@@ -448,7 +445,6 @@ GpStatus WINGDIPAPI GdipDeleteFontFamily(GpFontFamily *FontFamily)
TRACE
(
"Deleting %p (%s)
\n
"
,
FontFamily
,
debugstr_w
(
FontFamily
->
FamilyName
));
if
(
FontFamily
->
FamilyName
)
GdipFree
(
FontFamily
->
FamilyName
);
if
(
FontFamily
->
tmw
)
GdipFree
(
FontFamily
->
tmw
);
GdipFree
(
FontFamily
);
return
Ok
;
...
...
dlls/gdiplus/gdiplus_private.h
View file @
002b7c82
...
...
@@ -192,7 +192,7 @@ struct GpFontCollection{
};
struct
GpFontFamily
{
TEXTMETRICW
*
tmw
;
TEXTMETRICW
tmw
;
WCHAR
*
FamilyName
;
};
...
...
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