Page 1 of 1

text is invisible on my host

Posted: 2007-02-02T02:06:45-07:00
by mmelon
Hi,

All image manipulations that I have tried seem to work. Anything involving the output of text is blank. I have run the test advised here:

Code: Select all

<?php 
  header("Content-Type: text/plain"); 
  system("exec 2>&1; type convert");
// Output: convert is /usr/local/bin/convert   
  system("exec 2>&1; convert -version"); 
// Output: Version: ImageMagick 6.2.8 06/10/06 Q16 http://www.imagemagick.org
// Copyright: Copyright (C) 1999-2006 ImageMagick Studio LLC   
  system("exec 2>&1; convert -list type");
// Only the first couple of lines of this output :
// Path: /usr/local/lib/ImageMagick-6.2.8/config/type-ghostscript.xml Name Family Style Stretch Weight --------------------------------------------------------------------------------
// AvantGarde-Book AvantGarde Normal Normal 400 AvantGarde-BookOblique AvantGarde Oblique Normal 400 AvantGarde-Demi AvantGarde Normal Normal 600 
?> 
and this produces

Code: Select all

convert is /usr/bin/convert
Version: ImageMagick 6.3.0 11/25/06 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2006 ImageMagick Studio LLC


Path: /usr/lib/ImageMagick-6.3.0/config/type-ghostscript.xml

Name                             Family                 Style   Stretch   Weight
--------------------------------------------------------------------------------
AvantGarde-Book                  AvantGarde             Normal  Normal       400
AvantGarde-BookOblique           AvantGarde             Oblique Normal       400
AvantGarde-Demi                  AvantGarde             Normal  Normal       600
AvantGarde-DemiOblique           AvantGarde             Oblique Normal       600
Bookman-Demi                     Bookman                Normal  Normal       600
Bookman-DemiItalic               Bookman                Italic  Normal       600
Bookman-Light                    Bookman                Normal  Normal       300
Bookman-LightItalic              Bookman                Italic  Normal       300
Courier                          Courier                Normal  Normal       400
Courier-Bold                     Courier                Normal  Normal       700
Courier-BoldOblique              Courier                Oblique Normal       700
Courier-Oblique                  Courier                Oblique Normal       400
fixed                            Helvetica              Normal  Normal       400
Helvetica                        Helvetica              Normal  Normal       400
Helvetica-Bold                   Helvetica              Normal  Normal       700
Helvetica-BoldOblique            Helvetica              Italic  Normal       700
Helvetica-Narrow                 Helvetica Narrow       Normal  Condensed    400
Helvetica-Narrow-Bold            Helvetica Narrow       Normal  Condensed    700
Helvetica-Narrow-BoldOblique     Helvetica Narrow       Oblique Condensed    700
Helvetica-Narrow-Oblique         Helvetica Narrow       Oblique Condensed    400
Helvetica-Oblique                Helvetica              Italic  Normal       400
NewCenturySchlbk-Bold            NewCenturySchlbk       Normal  Normal       700
NewCenturySchlbk-BoldItalic      NewCenturySchlbk       Italic  Normal       700
NewCenturySchlbk-Italic          NewCenturySchlbk       Italic  Normal       400
NewCenturySchlbk-Roman           NewCenturySchlbk       Normal  Normal       400
Palatino-Bold                    Palatino               Normal  Normal       700
Palatino-BoldItalic              Palatino               Italic  Normal       700
Palatino-Italic                  Palatino               Italic  Normal       400
Palatino-Roman                   Palatino               Normal  Normal       400
Symbol                           Symbol                 Normal  Normal       400
Times-Bold                       Times                  Normal  Normal       700
Times-BoldItalic                 Times                  Italic  Normal       700
Times-Italic                     Times                  Italic  Normal       400
Times-Roman                      Times                  Normal  Normal       400
 
I reported the problem with my hosts (nativespace.co.uk) and they suggested Ghostscript would need to be installed. They have done that but the invisible text remains.

I have tried to illustrate to them what is supposed to happen by sending them the following link.

http://www.rubblewebs.co.uk/imagemagick/text.php

Does anybody have any ideas? Even a simple specific test or example that I could upload to glean more information?

Thanks everybody,
Mike

Posted: 2007-02-02T10:50:18-07:00
by Bonzo
You could try uploading a font to the same directory as your code and see if that works. I tend to use "true type fonts".

In this case I have uploaded verdana.ttf to the folder

Code: Select all

<?php 
exec("/usr/local/bin/convert -background lightblue -fill black -font verdana.ttf -size 250x40 -pointsize 30 caption:Test result.jpg ");

echo <img src=\"result.jpg\">";
?> 
I had a lot of trouble with text at one point but after my hosts upgraded ImageMagick and installed ghostscripts it started to work. Your version of Imagemagick is newer than mine so it should be OK.

Re: text is invisible on my host

Posted: 2007-02-05T06:03:18-07:00
by mmelon
Yes! That worked a treat. Thanks ever so much.

Mike