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
16f900fd
Commit
16f900fd
authored
Sep 26, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineps: Always escape Postscript reserved characters in font names.
parent
62e34022
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
download.c
dlls/wineps.drv/download.c
+5
-7
No files found.
dlls/wineps.drv/download.c
View file @
16f900fd
...
...
@@ -49,6 +49,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(psdrv);
*/
static
void
get_download_name
(
PHYSDEV
dev
,
LPOUTLINETEXTMETRICA
potm
,
char
**
str
)
{
static
const
char
reserved_chars
[]
=
" %/(){}[]<>
\n\r\t\b\f
"
;
int
len
;
char
*
p
;
DWORD
size
;
...
...
@@ -92,7 +93,7 @@ static void get_download_name(PHYSDEV dev, LPOUTLINETEXTMETRICA potm, char **str
memcpy
(
*
str
,
strings
+
name_record
->
offset
,
name_record
->
length
);
*
(
*
str
+
name_record
->
length
)
=
'\0'
;
HeapFree
(
GetProcessHeap
(),
0
,
name
);
return
;
goto
done
;
}
if
(
name_record
->
platform_id
==
3
&&
name_record
->
encoding_id
==
1
&&
name_record
->
language_id
==
0x409
&&
name_record
->
name_id
==
6
)
...
...
@@ -110,7 +111,7 @@ static void get_download_name(PHYSDEV dev, LPOUTLINETEXTMETRICA potm, char **str
WideCharToMultiByte
(
1252
,
0
,
unicode
,
-
1
,
*
str
,
len
,
NULL
,
NULL
);
HeapFree
(
GetProcessHeap
(),
0
,
unicode
);
HeapFree
(
GetProcessHeap
(),
0
,
name
);
return
;
goto
done
;
}
}
TRACE
(
"Unable to find PostScript name
\n
"
);
...
...
@@ -122,11 +123,8 @@ static void get_download_name(PHYSDEV dev, LPOUTLINETEXTMETRICA potm, char **str
*
str
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
strcpy
(
*
str
,
(
char
*
)
potm
+
(
ptrdiff_t
)
potm
->
otmpFaceName
);
p
=
*
str
;
while
((
p
=
strchr
(
p
,
' '
)))
*
p
=
'_'
;
return
;
done:
for
(
p
=
*
str
;
*
p
;
p
++
)
if
(
strchr
(
reserved_chars
,
*
p
))
*
p
=
'_'
;
}
/****************************************************************************
...
...
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