summaryrefslogtreecommitdiff
path: root/dviware/dvisvgm/src/PSInterpreter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dviware/dvisvgm/src/PSInterpreter.cpp')
-rw-r--r--dviware/dvisvgm/src/PSInterpreter.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/dviware/dvisvgm/src/PSInterpreter.cpp b/dviware/dvisvgm/src/PSInterpreter.cpp
index e9d33d7265..ba368f17ee 100644
--- a/dviware/dvisvgm/src/PSInterpreter.cpp
+++ b/dviware/dvisvgm/src/PSInterpreter.cpp
@@ -51,8 +51,15 @@ void PSInterpreter::init () {
"-dWRITESYSTEMDICT", // leave systemdict writable as some operators must be replaced
"-dNOPROMPT"
};
- if (int gsrev = _gs.revision())
+ if (int gsrev = _gs.revision()) {
gsargs.emplace_back(gsrev == 922 ? "-dREALLYDELAYBIND" : "-dDELAYBIND");
+ // As of GS 9.50, -dSAFER is active by default which leads to warnings
+ // in conjunction with -dDELAYBIND and -dWRITESYSTEMDICT.
+ // Thus, -dDELAYSAFER (or -dNOSAFER) must be added.
+ // https://www.ghostscript.com/doc/9.50/Use.htm#Safer
+ if (gsrev >= 950)
+ gsargs.emplace_back("-dDELAYSAFER");
+ }
_gs.init(gsargs.size(), gsargs.data(), this);
_gs.set_stdio(input, output, error);
_initialized = true;