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
5e1dd957
Commit
5e1dd957
authored
Mar 07, 2008
by
Jeremy White
Committed by
Alexandre Julliard
Mar 10, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Revise CreateScalableFontResourceA to pass through CreateScalableFontResourceW.
parent
bcb73115
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
16 deletions
+48
-16
font.c
dlls/gdi32/font.c
+48
-16
No files found.
dlls/gdi32/font.c
View file @
5e1dd957
...
@@ -2367,23 +2367,41 @@ BOOL WINAPI CreateScalableFontResourceA( DWORD fHidden,
...
@@ -2367,23 +2367,41 @@ BOOL WINAPI CreateScalableFontResourceA( DWORD fHidden,
LPCSTR
lpszFontFile
,
LPCSTR
lpszFontFile
,
LPCSTR
lpszCurrentPath
)
LPCSTR
lpszCurrentPath
)
{
{
HANDLE
f
;
LPWSTR
lpszResourceFileW
=
NULL
;
LPWSTR
lpszFontFileW
=
NULL
;
LPWSTR
lpszCurrentPathW
=
NULL
;
int
len
;
BOOL
ret
;
/* fHidden=1 - only visible for the calling app, read-only, not
if
(
lpszResourceFile
)
* enumbered with EnumFonts/EnumFontFamilies
{
* lpszCurrentPath can be NULL
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
lpszResourceFile
,
-
1
,
NULL
,
0
);
*/
lpszResourceFileW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
));
FIXME
(
"(%d,%s,%s,%s): stub
\n
"
,
MultiByteToWideChar
(
CP_ACP
,
0
,
lpszResourceFile
,
-
1
,
lpszResourceFileW
,
len
);
fHidden
,
debugstr_a
(
lpszResourceFile
),
debugstr_a
(
lpszFontFile
),
}
debugstr_a
(
lpszCurrentPath
)
);
/* If the output file already exists, return the ERROR_FILE_EXISTS error as specified in MSDN */
if
(
lpszFontFile
)
if
((
f
=
CreateFileA
(
lpszResourceFile
,
0
,
0
,
NULL
,
OPEN_EXISTING
,
FILE_ATTRIBUTE_NORMAL
,
0
))
!=
INVALID_HANDLE_VALUE
)
{
{
CloseHandle
(
f
);
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
lpszFontFile
,
-
1
,
NULL
,
0
);
SetLastError
(
ERROR_FILE_EXISTS
);
lpszFontFileW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
)
);
return
FALSE
;
MultiByteToWideChar
(
CP_ACP
,
0
,
lpszFontFile
,
-
1
,
lpszFontFileW
,
len
)
;
}
}
return
FALSE
;
/* create failed */
if
(
lpszCurrentPath
)
{
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
lpszCurrentPath
,
-
1
,
NULL
,
0
);
lpszCurrentPathW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
));
MultiByteToWideChar
(
CP_ACP
,
0
,
lpszCurrentPath
,
-
1
,
lpszCurrentPathW
,
len
);
}
ret
=
CreateScalableFontResourceW
(
fHidden
,
lpszResourceFileW
,
lpszFontFileW
,
lpszCurrentPathW
);
HeapFree
(
GetProcessHeap
(),
0
,
lpszResourceFileW
);
HeapFree
(
GetProcessHeap
(),
0
,
lpszFontFileW
);
HeapFree
(
GetProcessHeap
(),
0
,
lpszCurrentPathW
);
return
ret
;
}
}
/***********************************************************************
/***********************************************************************
...
@@ -2394,8 +2412,22 @@ BOOL WINAPI CreateScalableFontResourceW( DWORD fHidden,
...
@@ -2394,8 +2412,22 @@ BOOL WINAPI CreateScalableFontResourceW( DWORD fHidden,
LPCWSTR
lpszFontFile
,
LPCWSTR
lpszFontFile
,
LPCWSTR
lpszCurrentPath
)
LPCWSTR
lpszCurrentPath
)
{
{
FIXME
(
"(%d,%p,%p,%p): stub
\n
"
,
HANDLE
f
;
fHidden
,
lpszResourceFile
,
lpszFontFile
,
lpszCurrentPath
);
FIXME
(
"(%d,%s,%s,%s): stub
\n
"
,
fHidden
,
debugstr_w
(
lpszResourceFile
),
debugstr_w
(
lpszFontFile
),
debugstr_w
(
lpszCurrentPath
)
);
/* fHidden=1 - only visible for the calling app, read-only, not
* enumbered with EnumFonts/EnumFontFamilies
* lpszCurrentPath can be NULL
*/
/* If the output file already exists, return the ERROR_FILE_EXISTS error as specified in MSDN */
if
((
f
=
CreateFileW
(
lpszResourceFile
,
0
,
0
,
NULL
,
OPEN_EXISTING
,
FILE_ATTRIBUTE_NORMAL
,
0
))
!=
INVALID_HANDLE_VALUE
)
{
CloseHandle
(
f
);
SetLastError
(
ERROR_FILE_EXISTS
);
return
FALSE
;
}
return
FALSE
;
/* create failed */
return
FALSE
;
/* create failed */
}
}
...
...
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