
February 20th, 2013, 10:44 AM
|
|
Registered User
|
|
Join Date: Sep 2011
Posts: 23
Time spent in forums: 6 h 17 m 50 sec
Reputation Power: 0
|
|
Some example code:
Code:
#!/usr/bin/perl -w
use strict;
my $text = "Fuzzie Slippers\xd4 are great!";
$text =~ s|([\\\(\)])|\\$1|g;
$text =~ s/([\x00-\x1f\x7f-\xff])/sprintf('\\%03o',ord($1))/ge;
print "$text\n";
and the output is:
Code:
Fuzzie Slippers\324 are great!
how ever, if I use the PostScript::Simple text method:
Code:
$p->text({align => center}, 4.25, 5.5, $text);
the line in the PostScript file would look like this:
Code:
(Fuzzie Slippers\\xd4 are great!) dup stringwidth pop 2 div neg 0 rmoveto show
|