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
105caa28
Commit
105caa28
authored
Mar 28, 2012
by
Huw Davies
Committed by
Alexandre Julliard
Mar 29, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Implement CreateScalableFontResource.
Based on patches by Jeremy White and Dmitry Timoshkov.
parent
7ac623f3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
23 deletions
+8
-23
font.c
dlls/gdi32/font.c
+7
-21
freetype.c
dlls/gdi32/freetype.c
+0
-0
gdi_private.h
dlls/gdi32/gdi_private.h
+1
-0
font.c
dlls/gdi32/tests/font.c
+0
-2
No files found.
dlls/gdi32/font.c
View file @
105caa28
...
...
@@ -2873,28 +2873,14 @@ BOOL WINAPI CreateScalableFontResourceA( DWORD fHidden,
/***********************************************************************
* CreateScalableFontResourceW (GDI32.@)
*/
BOOL
WINAPI
CreateScalableFontResourceW
(
DWORD
fHidden
,
LPCWSTR
lpszResourceFile
,
LPCWSTR
lpszFontFile
,
LPCWSTR
lpszCurrentPath
)
{
HANDLE
f
;
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
* enumerated with EnumFonts/EnumFontFamilies
* lpszCurrentPath can be NULL
*/
BOOL
WINAPI
CreateScalableFontResourceW
(
DWORD
hidden
,
LPCWSTR
resource_file
,
LPCWSTR
font_file
,
LPCWSTR
font_path
)
{
TRACE
(
"(%d, %s, %s, %s)
\n
"
,
hidden
,
debugstr_w
(
resource_file
),
debugstr_w
(
font_file
),
debugstr_w
(
font_path
)
);
/* 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
WineEngCreateScalableFontResource
(
hidden
,
resource_file
,
font_file
,
font_path
);
}
/*************************************************************************
...
...
dlls/gdi32/freetype.c
View file @
105caa28
This diff is collapsed.
Click to expand it.
dlls/gdi32/gdi_private.h
View file @
105caa28
...
...
@@ -289,6 +289,7 @@ typedef struct
extern
INT
WineEngAddFontResourceEx
(
LPCWSTR
,
DWORD
,
PVOID
)
DECLSPEC_HIDDEN
;
extern
HANDLE
WineEngAddFontMemResourceEx
(
PVOID
,
DWORD
,
PVOID
,
LPDWORD
)
DECLSPEC_HIDDEN
;
extern
BOOL
WineEngCreateScalableFontResource
(
DWORD
,
LPCWSTR
,
LPCWSTR
,
LPCWSTR
)
DECLSPEC_HIDDEN
;
extern
BOOL
WineEngDestroyFontInstance
(
HFONT
handle
)
DECLSPEC_HIDDEN
;
extern
BOOL
WineEngGetLinkedHFont
(
DC
*
dc
,
WCHAR
c
,
HFONT
*
new_hfont
,
UINT
*
glyph
)
DECLSPEC_HIDDEN
;
extern
BOOL
WineEngInit
(
void
)
DECLSPEC_HIDDEN
;
...
...
dlls/gdi32/tests/font.c
View file @
105caa28
...
...
@@ -3989,13 +3989,11 @@ static void test_CreateScalableFontResource(void)
SetLastError
(
0xdeadbeef
);
ret
=
CreateScalableFontResource
(
0
,
fot_name
,
"random file name"
,
tmp_path
);
ok
(
!
ret
,
"CreateScalableFontResource() should fail
\n
"
);
todo_wine
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"not expected error %d
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
ret
=
CreateScalableFontResource
(
0
,
fot_name
,
NULL
,
ttf_name
);
ok
(
!
ret
,
"CreateScalableFontResource() should fail
\n
"
);
todo_wine
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"not expected error %d
\n
"
,
GetLastError
());
ret
=
DeleteFile
(
fot_name
);
...
...
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