From fefe1f842a2ed400f6571efc4a7e513733445924 Mon Sep 17 00:00:00 2001 From: John Ralls Date: Sat, 20 Apr 2013 23:09:26 +0000 Subject: [PATCH] Supply a concatstrings PostScript function To allow postscript documents to work without Ghostscript. svn: r22030 --- gramps/plugins/docgen/psdrawdoc.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gramps/plugins/docgen/psdrawdoc.py b/gramps/plugins/docgen/psdrawdoc.py index 051b39da3..d32514623 100644 --- a/gramps/plugins/docgen/psdrawdoc.py +++ b/gramps/plugins/docgen/psdrawdoc.py @@ -123,6 +123,13 @@ class PSDrawDoc(BaseDoc, DrawDoc): self.file.write( '%%EndComments\n' '/cm { 28.34 mul } def\n' + '%% Copied from http://en.wikibooks.org/wiki/PostScript_FAQ#How_to_concatenate_strings.3F, where it\'s attributed to Ghostscript, which might be why it worked originally\n' + '/concatstrings % (a) (b) -> (ab)\n' + ' { exch dup length\n' + ' 2 index length add string\n' + ' dup dup 4 2 roll copy length\n' + ' 4 -1 roll putinterval\n' + ' } bind def\n' '% build iso-latin-1 version of a font\n' '/font-to-iso-latin-1 { % font-to-iso-latin-1 \n' '%% reencode for iso latin1; from the 2nd edition red book, sec 5.6.1\n'