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
e7f6d779
Commit
e7f6d779
authored
Nov 06, 2013
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Nov 06, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Implement GdipPrivateAddFontFile.
parent
6278f5ff
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
5 deletions
+29
-5
font.c
dlls/gdiplus/font.c
+29
-5
No files found.
dlls/gdiplus/font.c
View file @
e7f6d779
...
...
@@ -1127,15 +1127,39 @@ GpStatus WINGDIPAPI GdipDeletePrivateFontCollection(GpFontCollection **fontColle
/*****************************************************************************
* GdipPrivateAddFontFile [GDIPLUS.@]
*/
GpStatus
WINGDIPAPI
GdipPrivateAddFontFile
(
GpFontCollection
*
fontCollection
,
GDIPCONST
WCHAR
*
filename
)
GpStatus
WINGDIPAPI
GdipPrivateAddFontFile
(
GpFontCollection
*
collection
,
GDIPCONST
WCHAR
*
name
)
{
FIXME
(
"stub: %p, %s
\n
"
,
fontCollection
,
debugstr_w
(
filename
));
HANDLE
file
,
mapping
;
LARGE_INTEGER
size
;
void
*
mem
;
GpStatus
status
;
TRACE
(
"%p, %s
\n
"
,
collection
,
debugstr_w
(
name
));
if
(
!
collection
||
!
name
)
return
InvalidParameter
;
if
(
!
(
fontCollection
&&
filename
))
file
=
CreateFileW
(
name
,
GENERIC_READ
,
0
,
NULL
,
OPEN_EXISTING
,
0
,
NULL
);
if
(
file
==
INVALID_HANDLE_VALUE
)
return
InvalidParameter
;
if
(
!
GetFileSizeEx
(
file
,
&
size
)
||
size
.
u
.
HighPart
)
{
CloseHandle
(
file
);
return
InvalidParameter
;
}
mapping
=
CreateFileMappingW
(
file
,
NULL
,
PAGE_READONLY
,
0
,
0
,
NULL
);
CloseHandle
(
file
);
if
(
!
mapping
)
return
InvalidParameter
;
mem
=
MapViewOfFile
(
mapping
,
FILE_MAP_READ
,
0
,
0
,
0
);
CloseHandle
(
mapping
);
if
(
!
mem
)
return
InvalidParameter
;
/* GdipPrivateAddMemoryFont creates a copy of the memory block */
status
=
GdipPrivateAddMemoryFont
(
collection
,
mem
,
size
.
u
.
LowPart
);
UnmapViewOfFile
(
mem
);
return
NotImplemented
;
return
status
;
}
#define TT_PLATFORM_APPLE_UNICODE 0
...
...
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