[gs-commits] ghostpdl branch, pdfi, updated. jbig2dec-0.14-2323-g7d0725f

[email protected] (Ken Sharp) Thu, 3 Oct 2019 12:25:08 +0000 (UTC)
Newsgroups gmane.comp.printing.ghostscript.cvs
Message-ID <[email protected]>
The ghostpdl branch, pdfi has been updated
       via  7d0725f2275af8dbbe40e0d73992632fb7f308ba (commit)
      from  07dee17077539c223b589f86899828881bb7801b (commit)

----------------------------------------------------------------------
commit 7d0725f2275af8dbbe40e0d73992632fb7f308ba
Author: Ken Sharp <[email protected]>
Date:   Thu Oct 3 11:32:10 2019 +0100

    Ignore null font error for now
    
    Until we get all the font types working a perfectly valid file can
    still end up trying to draw text when there is no font available. In
    the long run we do want this to be an error but for now, just accept
    it.

diff --git a/pdf/pdf_text.c b/pdf/pdf_text.c
index 6bb70c1..6ac89a1 100644
--- a/pdf/pdf_text.c
+++ b/pdf/pdf_text.c
@@ -281,7 +281,11 @@ static int pdfi_show(pdf_context *ctx, pdf_string *s)
     current_font = pdfi_get_current_pdf_font(ctx);
 
     if (current_font == NULL) {
-        pdfi_pop(ctx, 1);
+        /* This should be an error, but until we have all the font
+         * types available we can get a NULL font even though there's
+         * nthing wrong with the file, so for now don't throw an error.
+         */
+        return 0;
         return_error(gs_error_invalidfont);
     }
 


Summary of changes:
 pdf/pdf_text.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)