diff options
author | Thomas Deutschmann <whissi@gentoo.org> | 2020-09-10 18:10:49 +0200 |
---|---|---|
committer | Thomas Deutschmann <whissi@gentoo.org> | 2020-09-11 20:06:36 +0200 |
commit | acfc02c1747065fe450c7cfeb6f1844b62335f08 (patch) | |
tree | 5887806a2e6b99bbb0255e013a9028810e230a7f /devices/vector/gdevpdtw.c | |
parent | Import Ghostscript 9.52 (diff) | |
download | ghostscript-gpl-patches-acfc02c1747065fe450c7cfeb6f1844b62335f08.tar.gz ghostscript-gpl-patches-acfc02c1747065fe450c7cfeb6f1844b62335f08.tar.bz2 ghostscript-gpl-patches-acfc02c1747065fe450c7cfeb6f1844b62335f08.zip |
Import Ghostscript 9.53ghostscript-9.53
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'devices/vector/gdevpdtw.c')
-rw-r--r-- | devices/vector/gdevpdtw.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/devices/vector/gdevpdtw.c b/devices/vector/gdevpdtw.c index be3c874d..6d197bd5 100644 --- a/devices/vector/gdevpdtw.c +++ b/devices/vector/gdevpdtw.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2019 Artifex Software, Inc. +/* Copyright (C) 2001-2020 Artifex Software, Inc. All Rights Reserved. This software is provided AS-IS with no warranty, either express or @@ -119,6 +119,9 @@ pdf_simple_font_needs_ToUnicode(const pdf_font_resource_t *pdfont) In this circumstance, write the ToUnicode map to get a searchable PDF. */ return true; + if (!pdfont->TwoByteToUnicode) + return true; + for (ch = 0; ch < 256; ++ch) { pdf_encoding_element_t *pet = &pdfont->u.simple.Encoding[ch]; gs_glyph glyph = pet->glyph; @@ -136,6 +139,7 @@ pdf_simple_font_needs_ToUnicode(const pdf_font_resource_t *pdfont) if( glyph > GS_C_PDF_MAX_GOOD_GLYPH || !(gs_c_pdf_glyph_type[glyph >> 2] & (mask << (( glyph & 3 )<<1) ))) return true; + } return false; } |