pfa font and label

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
immortal26

pfa font and label

Post 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?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: pfa font and label

Post 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?
snibgo's IM pages: im.snibgo.com
immortal26

Re: pfa font and label

Post by immortal26 »

Yup worked just fine.... weird.

I'm going to pm you the pfa font, maybe you can give it a try?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: pfa font and label

Post 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?
snibgo's IM pages: im.snibgo.com
immortal26

Re: pfa font and label

Post 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
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: pfa font and label

Post by anthony »

Try using a truetype font and see if that works fine.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply