From d8e9c40a4357e73b261d28baded6ac346016d996 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 16 May 2019 00:51:57 +0100 Subject: [PATCH] copy txt2ps from gdr talk Signed-off-by: Ian Jackson --- txt2ps | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 txt2ps diff --git a/txt2ps b/txt2ps new file mode 100755 index 0000000..b8d9738 --- /dev/null +++ b/txt2ps @@ -0,0 +1,23 @@ +#!/usr/bin/perl -w + +use strict; + +my $fs=11; + +print " +\%! + /Courier findfont $fs scalefont setfont + 0 800 moveto +" or die; + +print "gsave 1 setgray 0 $fs rlineto stroke grestore\n" or die $!; + +while () { + chomp or die; + print "gsave (" or die; + s/[\\()]/\\$&/g; + print or die $!; + print ") show grestore 0 -$fs rmoveto\n" or die $!; +} + +print "1 setgray 0 $fs rmoveto 1 1 rlineto stroke showpage\n" or die $!; -- 2.30.2