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
d79de513
Commit
d79de513
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 custom glyph names.
parent
b66fcd68
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
1 deletion
+30
-1
download.c
dlls/wineps.drv/download.c
+30
-1
No files found.
dlls/wineps.drv/download.c
View file @
d79de513
...
@@ -644,6 +644,35 @@ static int get_post2_name_index(BYTE *post2header, DWORD size, WORD index)
...
@@ -644,6 +644,35 @@ static int get_post2_name_index(BYTE *post2header, DWORD size, WORD index)
return
GET_BE_WORD
(
post2header
+
offset
);
return
GET_BE_WORD
(
post2header
+
offset
);
}
}
static
void
get_post2_custom_glyph_name
(
BYTE
*
post2header
,
DWORD
size
,
WORD
index
,
char
*
name
)
{
USHORT
numberOfGlyphs
=
GET_BE_WORD
(
post2header
);
int
i
,
name_offset
=
(
1
+
numberOfGlyphs
)
*
sizeof
(
USHORT
);
BYTE
name_length
=
0
;
for
(
i
=
0
;
i
<=
index
;
i
++
)
{
name_offset
+=
name_length
;
if
(
name_offset
+
sizeof
(
BYTE
)
>
size
)
{
FIXME
(
"Pascal name offset '%d' exceeds PostScript Format 2 table size (%d)
\n
"
,
name_offset
+
sizeof
(
BYTE
),
size
);
return
;
}
name_length
=
(
post2header
+
name_offset
)[
0
];
if
(
name_offset
+
name_length
>
size
)
{
FIXME
(
"Pascal name offset '%d' exceeds PostScript Format 2 table size (%d)
\n
"
,
name_offset
+
name_length
,
size
);
return
;
}
name_offset
+=
sizeof
(
BYTE
);
}
name_length
=
min
(
name_length
,
MAX_G_NAME
);
memcpy
(
name
,
post2header
+
name_offset
,
name_length
);
name
[
name_length
]
=
0
;
}
void
get_glyph_name
(
HDC
hdc
,
WORD
index
,
char
*
name
)
void
get_glyph_name
(
HDC
hdc
,
WORD
index
,
char
*
name
)
{
{
struct
struct
...
@@ -703,7 +732,7 @@ void get_glyph_name(HDC hdc, WORD index, char *name)
...
@@ -703,7 +732,7 @@ void get_glyph_name(HDC hdc, WORD index, char *name)
else
if
(
glyphNameIndex
<
258
)
else
if
(
glyphNameIndex
<
258
)
get_standard_glyph_name
(
glyphNameIndex
,
name
);
get_standard_glyph_name
(
glyphNameIndex
,
name
);
else
else
FIXME
(
"PostScript Format 2 custom glyphs are currently unsupported.
\n
"
);
get_post2_custom_glyph_name
(
post2header
,
size
,
glyphNameIndex
-
258
,
name
);
}
}
else
else
FIXME
(
"PostScript Format %d.%d glyph names are currently unsupported.
\n
"
,
FIXME
(
"PostScript Format %d.%d glyph names are currently unsupported.
\n
"
,
...
...
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