GDFONTPATH doesn't work for Windows.

joshduck - November 9, 2006 - 04:57
Project:Signwriter
Version:HEAD
Component:Code
Category:task
Priority:normal
Assigned:Unassigned
Status:active
Description

I was testing on my local machine, and the module was having trouble because it tries to delimit the GDFONTPATH with colons. PHP on windows uses a semi colon as a delimiter.

My quick fix (for others with this problem) is to remove the existing 'putenv', and just substitute the following when checking for font path.

if ($userfontpath != '') {
putenv('GDFONTPATH=' . realpath('.') . '/' . $userfontpath);
}

#1

wrunt - November 27, 2006 - 02:33
Status:active» fixed

This should be fixed in the latest release. I've added a test for windows, and used semicolons to separate the font path.

#2

Anonymous - December 11, 2006 - 02:45
Status:fixed» closed

#3

mcscreech - February 25, 2009 - 18:16

I realize this is an older thread but, I just registered for this forum after searching for an answer to this problem and thought I'd add my 2 cents.

I discovered the following combination works on my machine:

putenv('GDFONTPATH=C:\WINDOWS\Fonts');
$font = getenv('GDFONTPATH') . '\comic.ttf';

This is on a WinXP Pro SP2 pc with Apache/2.2.11, PHP/5.2.8, GD/2.0.34 and mySQL/5.0.51a.

HTH, DaveT.

#4

Justin W Freeman - February 25, 2009 - 19:46
Category:bug report» task
Status:closed» active

Reopening so we can check this out.

#5

Justin W Freeman - February 25, 2009 - 19:46
Version:4.7.x-1.x-dev» HEAD
 
 

Drupal is a registered trademark of Dries Buytaert.