Download & Extend

GDFONTPATH doesn't work for Windows.

Project:Signwriter
Version:master
Component:Code
Category:task
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

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);
}

Comments

#1

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

Status:fixed» closed (fixed)

#3

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

Category:bug report» task
Status:closed (fixed)» active

Reopening so we can check this out.

#5

Version:4.7.x-1.x-dev» master