|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-07-12 14:36 UTC] rasmus@php.net
[2001-07-12 15:40 UTC] ben at kescom dot net
[2001-07-12 16:00 UTC] dbeu@php.net
[2001-07-12 16:08 UTC] wez@php.net
[2001-07-12 17:18 UTC] ben at kescom dot net
[2001-07-12 17:34 UTC] ben at kescom dot net
[2001-07-22 19:20 UTC] joey@php.net
[2001-07-22 19:22 UTC] ben at kescom dot net
[2001-07-23 03:36 UTC] dbeu@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 08:00:02 2025 UTC |
The GD TrueType functions can't find fonts; relative paths and absolute paths both do not work. Example (font is in the local directory, and . is part of my php.ini include_path) <? $image = ImageCreateTrueColor(200,200); ImageTTFText($image, 20, 0, 2, 15, $red, "d:/path/to/font.ttf", "Some text."); header("Content-type: image/jpeg"); // alternatively, ImageTTFText($image, 20, 0, 2, 15, $red, "font.ttf", "Some text."); header("Content-type: image/jpeg"); ImageJPEG($image, '', 100); ImageDestroy($image); ?> (written off the top of my head, it's in a larger script, but test scripts I wrote and unfortunately deleted don't work either) PHP reports: Warning: Could not find/open font in d:\path\to\fonttest.php on line 3 This is from the binary Win32 distribution of PHP 4.0.6 on php.net.