Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.postscript > #2385 > unrolled thread

Perl PostScript::Simple problem (font selection?)

Started byN4TY <n4ty@me.com>
First post2015-11-23 21:17 -0800
Last post2015-11-24 01:47 -0500
Articles 3 — 3 participants

Back to article view | Back to comp.lang.postscript


Contents

  Perl PostScript::Simple problem (font selection?) N4TY <n4ty@me.com> - 2015-11-23 21:17 -0800
    Re: Perl PostScript::Simple problem (font selection?) Carlos <angus@quovadis.com.ar> - 2015-11-24 07:15 +0100
    Re: Perl PostScript::Simple problem (font selection?) tlvp <mPiOsUcB.EtLlLvEp@att.net> - 2015-11-24 01:47 -0500

#2385 — Perl PostScript::Simple problem (font selection?)

FromN4TY <n4ty@me.com>
Date2015-11-23 21:17 -0800
SubjectPerl PostScript::Simple problem (font selection?)
Message-ID<32ff5f8b-76f5-4ce6-a05c-7e3613c2d2df@googlegroups.com>
I have an existing working Perl script using Postscript::Simple-0.07 on a Mac 10.9, Perl 5.12.
Having problems with a new Macbook Pro, OS X 10.10 , Perl 5.18, Postscript::Simple-0.09.

My script is failing on simple things like "setfont" and "setcolour". 
A simple failing program and errors is below.  
Is this a font selection problem?  Thoughts on how to proceed?

Thanks!  
- Tyler


#!/usr/bin/perl

use strict;
use warnings;
use PostScript::Simple;

my $p = new PostScript::Simple(papersize => "Letter", eps => 0, units => "cm");

# ANY OF THESE CAUSE ERRORS (see below):
$p->setcolour("black");
$p->setfont("Times-Bold", 9);
$p->setfont("Times-Roman", 9);

exit;



Errors posted (1st line always the same):
internal page error at /Library/Perl/5.18/PostScript/Simple.pm line 2074.
PostScript::Simple::_addtopage('PostScript::Simple=HASH(0x7fe0c202c1d0)', '/Times-Roman findfont 9 scalefont setfont\x{a}') called at /Library/Perl/5.18/PostScript/Simple.pm line 1667
PostScript::Simple::setfont('PostScript::Simple=HASH(0x7fe0c202c1d0)', 'Times-Roman', 9) called at ps_test.pl line 14

[toc] | [next] | [standalone]


#2386

FromCarlos <angus@quovadis.com.ar>
Date2015-11-24 07:15 +0100
Message-ID<20151124071536.1bf6b89f@samara.DOMA>
In reply to#2385
[N4TY <n4ty@me.com>, 2015-11-23 21:17]
> I have an existing working Perl script using Postscript::Simple-0.07
> on a Mac 10.9, Perl 5.12. Having problems with a new Macbook Pro, OS
> X 10.10 , Perl 5.18, Postscript::Simple-0.09.
> 
> My script is failing on simple things like "setfont" and "setcolour". 
> A simple failing program and errors is below.  
> Is this a font selection problem?  Thoughts on how to proceed?
> 
> Thanks!  
> - Tyler
> 
> 
> #!/usr/bin/perl
> 
> use strict;
> use warnings;
> use PostScript::Simple;
> 
> my $p = new PostScript::Simple(papersize => "Letter", eps => 0, units
> => "cm");
> 
> # ANY OF THESE CAUSE ERRORS (see below):
> $p->setcolour("black");
> $p->setfont("Times-Bold", 9);
> $p->setfont("Times-Roman", 9);
> 
> exit;
> 
> 
> 
> Errors posted (1st line always the same):
> internal page error at /Library/Perl/5.18/PostScript/Simple.pm line
> 2074.
> PostScript::Simple::_addtopage('PostScript::Simple=HASH(0x7fe0c202c1d0)',
> '/Times-Roman findfont 9 scalefont setfont\x{a}') called
> at /Library/Perl/5.18/PostScript/Simple.pm line 1667
> PostScript::Simple::setfont('PostScript::Simple=HASH(0x7fe0c202c1d0)',
> 'Times-Roman', 9) called at ps_test.pl line 14

I think you have to do

  $p->newpage;

before anything else.

HTH
-- 


[toc] | [prev] | [next] | [standalone]


#2387

Fromtlvp <mPiOsUcB.EtLlLvEp@att.net>
Date2015-11-24 01:47 -0500
Message-ID<66s6e5y0jypo$.wxue0wb3v3mf.dlg@40tude.net>
In reply to#2385
On Mon, 23 Nov 2015 21:17:14 -0800 (PST), N4TY asked about:

> use PostScript::Simple;
> 
> my $p = new PostScript::Simple(papersize => "Letter", eps => 0, units => "cm");
> 
> # ANY OF THESE CAUSE ERRORS (see below):
> $p->setcolour("black");
> $p->setfont("Times-Bold", 9);
> $p->setfont("Times-Roman", 9);

When I set my bait as [ postscript setcolour command ], Google said: 

> Showing results for postscript setcolor command
> Search instead for postscript setcolour command

Could it be "setcolour" isn't a recognized postscript imprecation :-) ?

Cheers, -- tlvp
-- 
Avant de repondre, jeter la poubelle, SVP.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.postscript


csiph-web