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
b66fcd68
Commit
b66fcd68
authored
Sep 03, 2015
by
Erich E. Hoover
Committed by
Alexandre Julliard
Sep 15, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineps.drv: Add support for PostScript Format 2 standard glyph names.
parent
ce0fbe4f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
0 deletions
+32
-0
download.c
dlls/wineps.drv/download.c
+32
-0
No files found.
dlls/wineps.drv/download.c
View file @
b66fcd68
...
...
@@ -631,6 +631,19 @@ static void get_standard_glyph_name(WORD index, char *name)
snprintf
(
name
,
MAX_G_NAME
+
1
,
"%s"
,
glyph_table
[
index
]
->
sz
);
}
static
int
get_post2_name_index
(
BYTE
*
post2header
,
DWORD
size
,
WORD
index
)
{
USHORT
numberOfGlyphs
=
GET_BE_WORD
(
post2header
);
DWORD
offset
=
(
1
+
index
)
*
sizeof
(
USHORT
);
if
(
offset
+
sizeof
(
USHORT
)
>
size
||
index
>=
numberOfGlyphs
)
{
FIXME
(
"Index '%d' exceeds PostScript Format 2 table size (%d)
\n
"
,
index
,
numberOfGlyphs
);
return
-
1
;
}
return
GET_BE_WORD
(
post2header
+
offset
);
}
void
get_glyph_name
(
HDC
hdc
,
WORD
index
,
char
*
name
)
{
struct
...
...
@@ -673,6 +686,25 @@ void get_glyph_name(HDC hdc, WORD index, char *name)
else
WARN
(
"Font uses PostScript Format 1, but non-standard glyph (%d) requested.
\n
"
,
index
);
}
else
if
(
post_header
->
format
==
MAKELONG
(
0
,
2
))
{
BYTE
*
post2header
=
post
+
sizeof
(
*
post_header
);
int
glyphNameIndex
;
size
-=
sizeof
(
*
post_header
);
if
(
size
<
sizeof
(
USHORT
))
{
FIXME
(
"PostScript Format 2 table is invalid (cannot fit header)
\n
"
);
goto
cleanup
;
}
glyphNameIndex
=
get_post2_name_index
(
post2header
,
size
,
index
);
if
(
glyphNameIndex
==
-
1
)
goto
cleanup
;
/* invalid index, use fallback name */
else
if
(
glyphNameIndex
<
258
)
get_standard_glyph_name
(
glyphNameIndex
,
name
);
else
FIXME
(
"PostScript Format 2 custom glyphs are currently unsupported.
\n
"
);
}
else
FIXME
(
"PostScript Format %d.%d glyph names are currently unsupported.
\n
"
,
HIWORD
(
post_header
->
format
),
LOWORD
(
post_header
->
format
));
...
...
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