summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gs/base/gxfcopy.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gs/base/gxfcopy.c b/gs/base/gxfcopy.c
index 12793f046..38159c25e 100644
--- a/gs/base/gxfcopy.c
+++ b/gs/base/gxfcopy.c
@@ -2217,10 +2217,14 @@ gs_copy_glyph_options(gs_font *font, gs_glyph glyph, gs_font *copied,
2217 * the glyp-h component in the name table. If we are using names then we 2217 * the glyp-h component in the name table. If we are using names then we
2218 * absolutely *must* have an entry in the name table, so go ahead and add 2218 * absolutely *must* have an entry in the name table, so go ahead and add
2219 * one here. Note that the array returned by psf_add_subset_pieces has the 2219 * one here. Note that the array returned by psf_add_subset_pieces has the
2220 * GIDs with an offset of GS_MIN_GLYPH_INDEX added. 2220 * GIDs with an offset of GS_MIN_GLYPH_INDEX added. Previously we removed this
2221 * offset, but if the resulting GID referenced a name already in use (or later used)
2222 * then the generated CMAP was incorrect. By leaving the offset in place we get
2223 * a name generated (numeric name based on GID) which gurantees no name collisions.
2224 * (Bug #693444).
2221 */ 2225 */
2222 if (code == 0 && glyph < GS_MIN_CID_GLYPH && glyphs[i] > GS_MIN_GLYPH_INDEX) { 2226 if (code == 0 && glyph < GS_MIN_CID_GLYPH && glyphs[i] > GS_MIN_GLYPH_INDEX) {
2223 code = copy_glyph_name(font, glyphs[i] - GS_MIN_GLYPH_INDEX, copied, 2227 code = copy_glyph_name(font, glyphs[i], copied,
2224 glyphs[i]); 2228 glyphs[i]);
2225 if (code < 0) 2229 if (code < 0)
2226 return code; 2230 return code;