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
638f63d1
Commit
638f63d1
authored
Jul 03, 2008
by
Adam Petaccia
Committed by
Alexandre Julliard
Jul 07, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Implement GdipCloneFontFamily.
parent
cbce6180
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
3 deletions
+27
-3
font.c
dlls/gdiplus/font.c
+17
-2
font.c
dlls/gdiplus/tests/font.c
+10
-1
No files found.
dlls/gdiplus/font.c
View file @
638f63d1
...
@@ -411,10 +411,25 @@ GpStatus WINGDIPAPI GdipCloneFontFamily(GpFontFamily* FontFamily, GpFontFamily**
...
@@ -411,10 +411,25 @@ GpStatus WINGDIPAPI GdipCloneFontFamily(GpFontFamily* FontFamily, GpFontFamily**
{
{
if
(
!
(
FontFamily
&&
clonedFontFamily
))
return
InvalidParameter
;
if
(
!
(
FontFamily
&&
clonedFontFamily
))
return
InvalidParameter
;
FIXM
E
(
"stub: %p (%s), %p
\n
"
,
FontFamily
,
TRAC
E
(
"stub: %p (%s), %p
\n
"
,
FontFamily
,
debugstr_w
(
FontFamily
->
FamilyName
),
clonedFontFamily
);
debugstr_w
(
FontFamily
->
FamilyName
),
clonedFontFamily
);
return
NotImplemented
;
*
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
);
return
Ok
;
}
}
/*******************************************************************************
/*******************************************************************************
...
...
dlls/gdiplus/tests/font.c
View file @
638f63d1
...
@@ -150,7 +150,7 @@ static void test_logfont(void)
...
@@ -150,7 +150,7 @@ static void test_logfont(void)
static
void
test_fontfamily
(
void
)
static
void
test_fontfamily
(
void
)
{
{
GpFontFamily
*
f
amily
;
GpFontFamily
*
family
,
*
clonedFontF
amily
;
WCHAR
itsName
[
LF_FACESIZE
];
WCHAR
itsName
[
LF_FACESIZE
];
GpStatus
stat
;
GpStatus
stat
;
...
@@ -180,7 +180,16 @@ static void test_fontfamily (void)
...
@@ -180,7 +180,16 @@ static void test_fontfamily (void)
expect
(
Ok
,
stat
);
expect
(
Ok
,
stat
);
}
}
/* Make sure we don't read old data */
ZeroMemory
(
itsName
,
sizeof
(
itsName
));
stat
=
GdipCloneFontFamily
(
family
,
&
clonedFontFamily
);
expect
(
Ok
,
stat
);
GdipDeleteFontFamily
(
family
);
GdipDeleteFontFamily
(
family
);
stat
=
GdipGetFamilyName
(
clonedFontFamily
,
itsName
,
LANG_NEUTRAL
);
expect
(
Ok
,
stat
);
expect
(
0
,
lstrcmpiW
(
itsName
,
arial
));
GdipDeleteFontFamily
(
clonedFontFamily
);
}
}
...
...
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