[cairo-commit] 2 commits - src/cairo-ps-surface.c

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jul 23 12:11:05 UTC 2021


 src/cairo-ps-surface.c |   22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

New commits:
commit 0d3090ad8412907d380cca3b76345c15979eb2d9
Merge: bfedda6a1 0f18a873e
Author: Uli Schlachter <psychon at znc.in>
Date:   Fri Jul 23 12:11:04 2021 +0000

    Merge branch 'issue-411' into 'master'
    
    PS: ensure setup DSC comments are in BeginSetup section
    
    Closes #411
    
    See merge request cairo/cairo!208

commit 0f18a873ef21107a3c5c5bea5ea57d544da74d5a
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Fri Jul 23 19:10:55 2021 +0930

    PS: ensure setup DSC comments are in BeginSetup section
    
    Fixes #411

diff --git a/src/cairo-ps-surface.c b/src/cairo-ps-surface.c
index fb2696ea6..0e7b77059 100644
--- a/src/cairo-ps-surface.c
+++ b/src/cairo-ps-surface.c
@@ -497,17 +497,6 @@ _cairo_ps_surface_emit_header (cairo_ps_surface_t *surface)
 
     _cairo_output_stream_printf (surface->final_stream,
 				 "%%%%EndProlog\n");
-
-    num_comments = _cairo_array_num_elements (&surface->dsc_setup_comments);
-    if (num_comments) {
-	comments = _cairo_array_index (&surface->dsc_setup_comments, 0);
-	for (i = 0; i < num_comments; i++) {
-	    _cairo_output_stream_printf (surface->final_stream,
-					 "%s\n", comments[i]);
-	    free (comments[i]);
-	    comments[i] = NULL;
-	}
-    }
 }
 
 static cairo_status_t
@@ -1764,6 +1753,17 @@ _cairo_ps_surface_finish (void *abstract_surface)
     _cairo_output_stream_printf (surface->final_stream,
 				 "%%%%BeginSetup\n");
 
+    num_comments = _cairo_array_num_elements (&surface->dsc_setup_comments);
+    if (num_comments) {
+	comments = _cairo_array_index (&surface->dsc_setup_comments, 0);
+	for (i = 0; i < num_comments; i++) {
+	    _cairo_output_stream_printf (surface->final_stream,
+					 "%s\n", comments[i]);
+	    free (comments[i]);
+	    comments[i] = NULL;
+	}
+    }
+
     status = _cairo_ps_surface_emit_font_subsets (surface);
     if (unlikely (status))
 	goto CLEANUP;


More information about the cairo-commit mailing list