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
ed985acd
Commit
ed985acd
authored
Jul 07, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Store the family name directly in the GpFontFamily structure.
parent
d17d5664
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
24 deletions
+6
-24
font.c
dlls/gdiplus/font.c
+5
-23
gdiplus_private.h
dlls/gdiplus/gdiplus_private.h
+1
-1
No files found.
dlls/gdiplus/font.c
View file @
ed985acd
...
...
@@ -98,7 +98,7 @@ GpStatus WINGDIPAPI GdipCreateFont(GDIPCONST GpFontFamily *fontFamily,
const
NEWTEXTMETRICW
*
tmw
;
GpStatus
stat
;
if
(
!
fontFamily
||
!
font
Family
->
FamilyName
||
!
font
)
if
(
!
fontFamily
||
!
font
)
return
InvalidParameter
;
TRACE
(
"%p (%s), %f, %d, %d, %p
\n
"
,
fontFamily
,
...
...
@@ -118,7 +118,7 @@ GpStatus WINGDIPAPI GdipCreateFont(GDIPCONST GpFontFamily *fontFamily,
lfw
->
lfStrikeOut
=
tmw
->
tmStruckOut
;
lfw
->
lfCharSet
=
tmw
->
tmCharSet
;
lfw
->
lfPitchAndFamily
=
tmw
->
tmPitchAndFamily
;
lstrcpynW
(
(
lfw
->
lfFaceName
),
facename
,
sizeof
(
WCHAR
)
*
LF_FACESIZE
);
lstrcpynW
(
lfw
->
lfFaceName
,
facename
,
LF_FACESIZE
);
switch
(
unit
)
{
...
...
@@ -405,15 +405,7 @@ GpStatus WINGDIPAPI GdipCreateFontFamilyFromName(GDIPCONST WCHAR *name,
if
(
!
ffamily
)
return
OutOfMemory
;
ffamily
->
tmw
=
ntm
;
ffamily
->
FamilyName
=
GdipAlloc
(
LF_FACESIZE
*
sizeof
(
WCHAR
));
if
(
!
ffamily
->
FamilyName
)
{
GdipFree
(
ffamily
);
return
OutOfMemory
;
}
lstrcpynW
(
ffamily
->
FamilyName
,
name
,
sizeof
(
WCHAR
)
*
LF_FACESIZE
);
lstrcpynW
(
ffamily
->
FamilyName
,
name
,
LF_FACESIZE
);
*
FontFamily
=
ffamily
;
...
...
@@ -442,17 +434,8 @@ GpStatus WINGDIPAPI GdipCloneFontFamily(GpFontFamily* FontFamily, GpFontFamily**
*
clonedFontFamily
=
GdipAlloc
(
sizeof
(
GpFontFamily
));
if
(
!*
clonedFontFamily
)
return
OutOfMemory
;
**
clonedFontFamily
=
*
FontFamily
;
(
*
clonedFontFamily
)
->
FamilyName
=
GdipAlloc
(
sizeof
(
WCHAR
)
*
LF_FACESIZE
);
if
(
!
(
*
clonedFontFamily
)
->
FamilyName
)
{
GdipFree
(
clonedFontFamily
);
return
OutOfMemory
;
}
lstrcpynW
((
*
clonedFontFamily
)
->
FamilyName
,
FontFamily
->
FamilyName
,
LF_FACESIZE
);
(
*
clonedFontFamily
)
->
tmw
=
FontFamily
->
tmw
;
lstrcpyW
((
*
clonedFontFamily
)
->
FamilyName
,
FontFamily
->
FamilyName
);
return
Ok
;
}
...
...
@@ -510,7 +493,6 @@ GpStatus WINGDIPAPI GdipDeleteFontFamily(GpFontFamily *FontFamily)
return
InvalidParameter
;
TRACE
(
"Deleting %p (%s)
\n
"
,
FontFamily
,
debugstr_w
(
FontFamily
->
FamilyName
));
GdipFree
(
FontFamily
->
FamilyName
);
GdipFree
(
FontFamily
);
return
Ok
;
...
...
dlls/gdiplus/gdiplus_private.h
View file @
ed985acd
...
...
@@ -193,7 +193,7 @@ struct GpFontCollection{
struct
GpFontFamily
{
NEWTEXTMETRICW
tmw
;
WCHAR
*
FamilyName
;
WCHAR
FamilyName
[
LF_FACESIZE
]
;
};
#endif
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