diff options
author | Adrian Johnson <ajohnson@redneon.com> | 2021-07-16 13:06:02 +0930 |
---|---|---|
committer | Adrian Johnson <ajohnson@redneon.com> | 2021-07-18 18:13:10 +0930 |
commit | e73b4c799e7bda112a5c9ee386b7e03cf0c0d21c (patch) | |
tree | 6a6a87cae904d1a0f5dd9a53c5434709469ea77f /boilerplate | |
parent | 26043a2db122dc149818ab2b1a7cacf33790b36c (diff) | |
download | cairo-e73b4c799e7bda112a5c9ee386b7e03cf0c0d21c.tar.gz |
Fix PS test crash
When the tests run ghostscipt on ps2 files it crashes with:
Error: /undefined in .setlanguagelevel
Operand stack:
2
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval--
Dictionary stack:
--dict:732/1123(ro)(G)-- --dict:0/20(G)-- --dict:75/200(L)--
Current allocation mode is local
GPL Ghostscript 9.53.3: Unrecoverable error, exit code 1
The problem is the "-c 2 .setlanguagelevel -f" on the gs command line
to set ghostscript to language level 2. I'm not sure why this no longer works.
.setlanguagelevel is not mentioned any where in the gs custom operators listed in
https://www.ghostscript.com/doc/current/Language.htm
I assume this operator was meant for ghostscript internal use and
is no longer exposed in recent versions. Remove it from the test.
Diffstat (limited to 'boilerplate')
-rw-r--r-- | boilerplate/cairo-boilerplate-ps.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/boilerplate/cairo-boilerplate-ps.c b/boilerplate/cairo-boilerplate-ps.c index 2c4c94f0e..73546046e 100644 --- a/boilerplate/cairo-boilerplate-ps.c +++ b/boilerplate/cairo-boilerplate-ps.c @@ -226,9 +226,8 @@ _cairo_boilerplate_ps_surface_write_to_png (cairo_surface_t *surface, char command[4096]; int exitstatus; - sprintf (command, "gs -q -r72 -g%dx%d -dSAFER -dBATCH -dNOPAUSE -sDEVICE=pngalpha -sOutputFile=%s %s %s", + sprintf (command, "gs -q -r72 -g%dx%d -dSAFER -dBATCH -dNOPAUSE -sDEVICE=pngalpha -sOutputFile=%s %s", ptc->width, ptc->height, filename, - ptc->level == CAIRO_PS_LEVEL_2 ? "-c 2 .setlanguagelevel -f" : "", ptc->filename); exitstatus = system (command); #if _XOPEN_SOURCE && HAVE_SIGNAL_H |