Select a font that includes the ½ symbol, then include the PostScript escape code for that symbol (275 in the normal encoding). The escape codes are defined in the PostScript Language Reference Manual Appendix E
#!/usr/bin/perl use warnings; use strict; use PostScript::Simple; my $p = new PostScript::Simple(papersize => "A4", colour => 1, eps => 0, units => "in"); $p->setcolour("black"); $p->setfont("Times-Roman-iso", 20); $p->text(1,1, "Chee\275se"); $p->output("file.ps");
Incidentally, the code you provided was of little use – it doesn't run by itself, and the user is required to guess values for $line_height and $out_line. I'd never used PostScript::Simple before, and this didn't make a lot of sense straight away. Anyway, the question was interesting.
Cheers
In reply to Re: Special characters and PostScript::Simple
by davis
in thread Special characters and PostScript::Simple
by PerlingTheUK
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |