[gs-commits] ghostpdl branch, master, updated. jbig2dec-0.14-1734-g618c386

[email protected] (Ken Sharp) Sat, 19 Oct 2019 10:06:52 +0000 (UTC)
Newsgroups gmane.comp.printing.ghostscript.cvs
Message-ID <[email protected]>
The ghostpdl branch, master has been updated
       via  618c3867b8edec9d0ea757949c926d4290995ac7 (commit)
      from  7acf36de36e6972be8a892078d214eea8e311cdd (commit)

----------------------------------------------------------------------
commit 618c3867b8edec9d0ea757949c926d4290995ac7
Author: Ken Sharp <[email protected]>
Date:   Sat Oct 19 11:06:46 2019 +0100

    Pattern handling- relax a heuristic
    
    Bug #701753 "Error reading a content stream" with pdf using Type3 font"
    
    This file uses a type 3 font with a FontMatrix more usually found in
    type 1 font; [0.001 0 0 0.001 0 0]. It is also a coloured font, and
    uses a Pattern colour space with a Shading function to colour the text.
    
    The Pattern cell, when scaled by the Font Matrix, results in a mapping
    of the step matrix to device space where the matrix determinant is less
    than 1/1,000,000. We detect this as a degenerate matrix and throw an
    error.
    
    Acrobat renders an empty page.
    
    So relax this heuristic further from 10^-6 to 10^-9, this allows the
    file to render and doesn't cause any changes in our regression tests.
    
    Of course, at this cell size, the pattern renders blank, just as it
    does with Acrobat.

diff --git a/base/gsptype1.c b/base/gsptype1.c
index f81a63c..8fe977f 100644
--- a/base/gsptype1.c
+++ b/base/gsptype1.c
@@ -235,7 +235,7 @@ gs_pattern1_make_pattern(gs_client_color * pcc,
             bbox.p.x = bbox.p.y = bbox.q.x = bbox.q.y = 0;
         } else {
             /* Check for singular stepping matrix. */
-            if (fabs(inst.step_matrix.xx * inst.step_matrix.yy - inst.step_matrix.xy * inst.step_matrix.yx) < 1.0e-6) {
+            if (fabs(inst.step_matrix.xx * inst.step_matrix.yy - inst.step_matrix.xy * inst.step_matrix.yx) < 1.0e-9) {
                 code = gs_note_error(gs_error_rangecheck);
                 goto fsaved;
             }


Summary of changes:
 base/gsptype1.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)