Bug #17717 Updated: Error: could not find/open font

From: Date: Wed, 12 Jun 2002 17:58:27 +0000
Subject: Bug #17717 Updated: Error: could not find/open font
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-10271@lists.php.net to get a copy of this message
 ID:               17717
 Updated by:       enrico.kliesch@mind-building.de
 Reported By:      enrico.kliesch@mind-building.de
-Status:           Bogus
+Status:           Closed
 Bug Type:         GD related
 Operating System: Windows 2000
 PHP Version:      4.2.1
 New Comment:

I found the soulution in another question.

You first have to define the GD font path:
putenv('GDFONTPATH=f:\www\radioshow\fonts');

then it works with:
ImageTTFText($im, $size, $angle, $x, $y, $black, $font, $text);


Previous Comments:
------------------------------------------------------------------------

[2002-06-12 07:34:03] webmaster@tsn.dk

The correct way is

$font = "/WINNT/Fonts/arial.ttf";

and sniper is right, this is a GDlib bug, and not PHP related..

It's a shame GDlib is never updated

------------------------------------------------------------------------

[2002-06-11 18:50:44] enrico.kliesch@mind-building.de

I also tried:

$font="./arial" //without .ttf

Enrico

------------------------------------------------------------------------

[2002-06-11 18:34:42] sniper@php.net

Please don't open ANOTHER report about exactly same issue.
Use the 'Advaced search' to find the other ones about this
and add your comment there.


------------------------------------------------------------------------

[2002-06-11 18:23:44] enrico.kliesch@mind-building.de

When I use the function:

ImageTTFText($im, $size, $angle, $x, $y, $black, $font, $text);

I see the error: Could not open/find font.

I tried to use a font the following things:

- $font="../arial.ttf"; //the font was on directory above
- $font="arial.ttf";    //the font was in the same dir
- $font="f:\\www\\script\\arial.ttf"; //the real path
- $font="./arial.ttf";  //in the same dir

in the Version 4.2.0 it works but i thougt the gd2 lib is better in
4.2.1 than 4.2.0.

Enrico

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=17717&edit=1



Thread (5 messages)

« previous php.bugs (#10271) next »