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
46532e8d
Commit
46532e8d
authored
Jan 15, 2013
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Add support for .fot files in RemoveFontResource.
parent
4fc8bf18
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
12 deletions
+23
-12
font.c
dlls/gdi32/font.c
+19
-1
font.c
dlls/gdi32/tests/font.c
+4
-11
No files found.
dlls/gdi32/font.c
View file @
46532e8d
...
...
@@ -3565,7 +3565,25 @@ BOOL WINAPI RemoveFontResourceExA( LPCSTR str, DWORD fl, PVOID pdv )
*/
BOOL
WINAPI
RemoveFontResourceExW
(
LPCWSTR
str
,
DWORD
fl
,
PVOID
pdv
)
{
return
WineEngRemoveFontResourceEx
(
str
,
fl
,
pdv
);
int
ret
=
WineEngRemoveFontResourceEx
(
str
,
fl
,
pdv
);
WCHAR
*
filename
;
if
(
ret
==
0
)
{
/* FreeType <2.3.5 has problems reading resources wrapped in PE files. */
HMODULE
hModule
=
LoadLibraryExW
(
str
,
NULL
,
LOAD_LIBRARY_AS_DATAFILE
);
if
(
hModule
!=
NULL
)
{
WARN
(
"Can't unload resources from PE file %s
\n
"
,
wine_dbgstr_w
(
str
));
FreeLibrary
(
hModule
);
}
else
if
((
filename
=
get_scalable_filename
(
str
))
!=
NULL
)
{
ret
=
WineEngRemoveFontResourceEx
(
filename
,
fl
,
pdv
);
HeapFree
(
GetProcessHeap
(),
0
,
filename
);
}
}
return
ret
;
}
/***********************************************************************
...
...
dlls/gdi32/tests/font.c
View file @
46532e8d
...
...
@@ -4475,22 +4475,11 @@ static void test_CreateScalableFontResource(void)
SetLastError
(
0xdeadbeef
);
ret
=
pRemoveFontResourceExA
(
fot_name
,
0
,
0
);
todo_wine
ok
(
ret
,
"RemoveFontResourceEx() error %d
\n
"
,
GetLastError
());
ret
=
is_truetype_font_installed
(
"wine_test"
);
todo_wine
ok
(
!
ret
,
"font wine_test should not be enumerated
\n
"
);
/* FIXME: since RemoveFontResource is a stub correct testing is impossible */
if
(
ret
)
{
/* remove once RemoveFontResource is implemented */
DeleteFile
(
fot_name
);
DeleteFile
(
ttf_name
);
return
;
}
ret
=
pRemoveFontResourceExA
(
fot_name
,
0
,
0
);
ok
(
!
ret
,
"RemoveFontResourceEx() should fail
\n
"
);
...
...
@@ -4509,17 +4498,21 @@ todo_wine
ok
(
ret
,
"AddFontResourceEx() error %d
\n
"
,
GetLastError
());
ret
=
is_truetype_font_installed
(
"wine_test"
);
todo_wine
ok
(
!
ret
,
"font wine_test should not be enumerated
\n
"
);
/* XP allows removing a private font added with 0 flags */
SetLastError
(
0xdeadbeef
);
ret
=
pRemoveFontResourceExA
(
fot_name
,
FR_PRIVATE
,
0
);
todo_wine
ok
(
ret
,
"RemoveFontResourceEx() error %d
\n
"
,
GetLastError
());
ret
=
is_truetype_font_installed
(
"wine_test"
);
todo_wine
ok
(
!
ret
,
"font wine_test should not be enumerated
\n
"
);
ret
=
pRemoveFontResourceExA
(
fot_name
,
0
,
0
);
todo_wine
ok
(
!
ret
,
"RemoveFontResourceEx() should fail
\n
"
);
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