I'm posting here because I am on a Windows platform, and serve my pages from an NT4SP6 
box.

Ok, I read a couple days ago that someone was having trouble with GD Lib in v4.0.6 of 
PHP.
I'm joining the band-wagon.  I missed if that person found a solution.

I downloaded and installed the supplied PHP distribution from www.php.net.

My problem is this:

I try to load a Type 1 font (.pfm) and get the following error:   T1Lib not compiled 
into this version.
I try to load a TTF font (.ttf) and get the following error: Cannot open/find font 
file.

Here is the complete code:

<?php

$im = ImageCreate(200, 100);
$backColor = ImageColorAllocate($im, 255, 255, 255);
$foreColor = ImageColorAllocate($im, 0, 0, 0);
// The next line fails with:  cannot open/find font file
// Permissions are set properly and the file exists
imagettftext($im, 12, 0, 25, 75, $foreColor, "c:/php406/fonts/code39.ttf", "*123456*");
// The next line fails with: T1Lib not compiled into this version
$myFont = imagepsloadfont("c:/php406/fonts/code39.pfm");
imagepng($im,"test.png");

?>

So, after looking all over FreeType (which says it stands alone, no other libraries 
needed), and has support for Type1 and TTF, and then looking at GDLib which says all 
it needs is FreeType.  I looked at the 4.0.6 changes and it said it ported the T1Lib 
from a previous PHP version.  Where is T1Lib coming into this, or rather, where did it 
go/why doesn't it work?

What am I missing?

The end result is a file, test.png, that is 200 x 100 and completely white.  Not bad, 
but I want font support.
Ciao
RDB

Reply via email to