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 |
Jump to:
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
This should be fixed in the latest release. I've added a test for windows, and used semicolons to separate the font path.
#2
#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
Reopening so we can check this out.
#5