Page 1 of 1

pfa font and label

Posted: 2010-07-13T11:55:53-07:00
by immortal26
Well simple as this.
Here is the code:

Code: Select all

$path = "/opt/local/bin/";
$comp = '/working/www/core/html/hc/back/comp/';
$bfont = '/working/www/core/html/hc/back/fonts/c128b.pfa';

$compolay = $path.'convert -pointsize 72 -fill "#000000" -background white -font '.$bfont.' label: "'.$barcode.'" '.$comp.'bar.png';
exec($compolay);
does not create the image.

Also when running a static command of the one above in the command line... just hangs, until I ctrl-c out

I have checked the formats, pfa is supported, gs is installed, ft is installed... everything is installed correctly, only hangs with this.

Any ideas?

Re: pfa font and label

Posted: 2010-07-13T12:22:43-07:00
by snibgo
I can't see anything obviously wrong. Does the command:

convert logo: logo.png

work?

If so, change things until it matches your command. At what point does it fail? What is the simplest command that fails?

Re: pfa font and label

Posted: 2010-07-13T12:28:50-07:00
by immortal26
Yup worked just fine.... weird.

I'm going to pm you the pfa font, maybe you can give it a try?

Re: pfa font and label

Posted: 2010-07-13T12:47:42-07:00
by snibgo
I've picked up the pfa font. Never heard of them, and know nothing about them. When I try:

convert -pointsize 20 -fill #000000 -font c128b.pfa label:"snibgo" x.png

I get Ghostscript errors:
Error: /typecheck in /findfont
Operand stack:
c128b.pfa-ISO c128b.pfa-ISO c128b.pfa
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-
- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- fa
lse 1 %stopped_push 1878 1 3 %oparray_pop 1877 1 3 %oparray_
pop 1861 1 3 %oparray_pop 1755 1 3 %oparray_pop --nostringval-
- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringv
al-- 2 %stopped_push --nostringval-- --nostringval-- 1836 3 3 %o
parray_pop
Dictionary stack:
--dict:1161/1684(ro)(G)-- --dict:0/20(G)-- --dict:72/200(L)--
Current allocation mode is local
Current file position is 259
GPL Ghostscript 8.71: Unrecoverable error, exit code 1
Error: /typecheck in /findfont
Operand stack:
c128b.pfa-ISO c128b.pfa-ISO c128b.pfa
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-
- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- fa
lse 1 %stopped_push 1878 1 3 %oparray_pop 1877 1 3 %oparray_
pop 1861 1 3 %oparray_pop 1755 1 3 %oparray_pop --nostringval-
- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringv
al-- 2 %stopped_push --nostringval-- --nostringval-- 1836 3 3 %o
parray_pop
Dictionary stack:
--dict:1161/1684(ro)(G)-- --dict:0/20(G)-- --dict:72/200(L)--
Current allocation mode is local
Current file position is 259
GPL Ghostscript 8.71: Unrecoverable error, exit code 1
convert: unable to read font `c128b.pfa' @ error/annotate.c/RenderFreetype/1056.
Could be a bad pfa file. Do other pfa files work?

Re: pfa font and label

Posted: 2010-07-13T13:26:37-07:00
by immortal26
hmm, i don't get any errors with it. The font is fine (bought lol).
Just hangs on mine, but no errors.
Maybe need some help from Admins

Re: pfa font and label

Posted: 2010-07-13T16:57:13-07:00
by anthony
Try using a truetype font and see if that works fine.