[gs-commits] ghostpdl branch, master, updated. jbig2dec-0.14-2037-g719bf1f

[email protected] (Ken Sharp) Wed, 18 Dec 2019 14:46:32 +0000 (UTC)
Newsgroups gmane.comp.printing.ghostscript.cvs
Message-ID <[email protected]>
The ghostpdl branch, master has been updated
       via  719bf1f2c4104d933767d37e62489535e8ba9a17 (commit)
      from  bb47dd4128481c2e62bbd6b5e354da8299f2f16b (commit)

----------------------------------------------------------------------
commit 719bf1f2c4104d933767d37e62489535e8ba9a17
Author: Ken Sharp <[email protected]>
Date:   Wed Dec 18 14:46:26 2019 +0000

    pdfwrite - use correct FontFile key
    
    This was found as part of bug #701997, even if we set -dCompatibilityLevel
    to 1.1, so that type 1 fonts are not converted to type 2 (1c, CFF) we
    would still write out a FontFile3 key, instead of the correct
    FontFile key.
    
    Ghostscript doesn't care about this, but Acrobat refuses to parse the
    font from the file when it has the wrong FontFile key.
    
    The test we were using was incorrect anyway, we were checking
    ResourcesBeforeUsgae and we should have been checking HaveCFF because
    if HaveCFF is true we would convert type 1 to CFF, and if it isn't we
    wouldn't.

diff --git a/devices/vector/gdevpdtb.c b/devices/vector/gdevpdtb.c
index 8c98f4a..9caa640 100644
--- a/devices/vector/gdevpdtb.c
+++ b/devices/vector/gdevpdtb.c
@@ -509,7 +509,7 @@ pdf_write_FontFile_entry(gx_device_pdf *pdev, pdf_base_font_t *pbfont)
         FontFile_key = "/FontFile2";
         break;
     default:			/* Type 1/2, CIDFontType 0 */
-        if (pdev->ResourcesBeforeUsage)
+        if (!pdev->HaveCFF)
             FontFile_key = "/FontFile";
         else
             FontFile_key = "/FontFile3";


Summary of changes:
 devices/vector/gdevpdtb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)