summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'toolbin/genfontmap.ps')
-rw-r--r--toolbin/genfontmap.ps16
1 files changed, 14 insertions, 2 deletions
diff --git a/toolbin/genfontmap.ps b/toolbin/genfontmap.ps
index 86b26ea5..565dcc74 100644
--- a/toolbin/genfontmap.ps
+++ b/toolbin/genfontmap.ps
@@ -16,10 +16,15 @@
% Create a Fontmap format file after scanning the FONTPATH directories
%
+% From Ghostscript version 9.50 onwards the default operation is to run with
+% SAFER defined; this disables a number of PostScript operators, specifically
+% in this case the .sort operator, which is used by this program. In order
+% to use this program you must run with -dNOSAFER.
+%
% Example usage:
-% windows: gswin32c -q -sFONTPATH=c:/windows/fonts genfontmap.ps > myFontmap
+% windows: gswin32c -dNOSAFER -q -sFONTPATH=c:/windows/fonts genfontmap.ps > myFontmap
%
-% unix: gs -q -sFONTPATH=/usr/local/fonts genfontmap.ps > myFontmap
+% unix: gs -dNOSAFER -q -sFONTPATH=/usr/local/fonts genfontmap.ps > myFontmap
%
% The myFontmap file created by the above can be renamed to Fontmap and
% placed in the LIBPATH directory.
@@ -33,6 +38,13 @@ FONTPATH length 0 eq {
flush quit
} if
+% Since version 9.50, ensure we are running in NOSAFER so that .sort is available
+/NOSAFER where {/NOSAFER get not}{true} ifelse
+{
+ (\n You must use the '-dNOSAFER' option in order to execute this program.\n\n) =error
+ flush quit
+} if
+
QUIET not {
(\n You must use the '-q' option in order to generate a clean Fontmap.\n\n) =error
flush quit