#22092 [Opn]: Strange warning and no functionality in imagettfbbox and imagettftext

From: Date: Thu, 06 Feb 2003 21:15:28 +0000
Subject: #22092 [Opn]: Strange warning and no functionality in imagettfbbox and imagettftext
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-32325@lists.php.net to get a copy of this message
ID: 22092 User updated by: davidl@tocquigny.com Reported By: davidl@tocquigny.com Status: Open Bug Type: GD related Operating System: Redhat 7.1 PHP Version: 4.3.0 New Comment: Also, it won't accept spaces in the font file name, if I have no spaces (ie arial.ttf) it works, with spaces (ie "futura bold.ttf") generates: Could not find/open font in /xxx/xxx/xxx/test2.php on line 3 Previous Comments: ------------------------------------------------------------------------ [2003-02-06 15:01:53] davidl@tocquigny.com okies, that fixed one problem and created another (although MUCH LESS MAJOR) the results now: 1 Warning: imagettfbbox() [function.imagettfbbox]: Could not find/open font in /xxx/xxx/xxx/xxx/test2.php on line 3 if I put an absolute path into the font location, it works, but relative paths do not. ------------------------------------------------------------------------ [2003-02-06 13:33:10] iliaa@php.net Try adding the --with-freetype-dir option to your configure. As is I cannot replicate the bug using the latest CVS (4.3.1-dev). ------------------------------------------------------------------------ [2003-02-06 13:18:56] davidl@tocquigny.com also tried adding --with-ttf to the 4.3.0 compile, still no love ------------------------------------------------------------------------ [2003-02-06 12:48:16] davidl@tocquigny.com just fyi, I put the /xxx/xxx/xxx in the file path to hide my directory structure, however the gibberish for a warning came completely from php :) ------------------------------------------------------------------------ [2003-02-06 12:46:42] davidl@tocquigny.com here is the script: <?php print file_exists("fonts/arial.ttf"); imagettfbbox(20, 0, "fonts/arial.ttf","Testing... "); ?> which produces the following: 1 Warning: imagettfbbox() [function.imagettfbbox]: øÈÿ¿G˜@ç%@ in /xxx/xxx/xxx/xxx/test2.php on line 3 so the font file exists, I don't know if that is the problem or not, but if I turn off error reporting, and use imagettftext, the text doesn't show up. I have several applications placing text on a jpeg that work in 4.2.3 and don't place any text in 4.3.0, making 4.3.0 unusable to me until I can figure out what the difference is. fyi, compile flags are: for 4.2.3 (working fine): './configure' '--with-apxs' '--with-mysql' '--with-ttf' '--with-jpeg-dir' '--with-gd' '--with-xpm-dir=/usr/X11R6' '--with-png' '--with-zlib' '--enable-track-vars' '--without-oracle' '--without-oci8' '--with-xml' '--with-pdflib=/usr/local' for 4.3.0 (not working): './configure' '--with-apxs' '--with-mysql' '--with-xpm-dir=/usr/X11R6' '--with-ttf' '--with-zlib' '--enable-track-vars' '--without-oracle' '--without-oci8' --with-gd '--with-xml' '--with-pdflib=/usr/local' '--disable-cgi' --with-jpeg-dir=/usr/lib/ --with-png --enable-gd-native-ttf Trying the same compile flags for 4.3 as was used on 4.2.3 doesn't work as well. Thanks in advance. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=22092&edit=1

« previous php.bugs (#32325) next »