php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37279 Rendered text is chopped off on end.
Submitted: 2006-05-02 18:18 UTC Modified: 2006-05-03 19:57 UTC
From: danb at zu dot com Assigned: pajoye (profile)
Status: Not a bug Package: GD related
PHP Version: 4.4.2 OS: Fedora FC4, Linux 2.6.15
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: danb at zu dot com
New email:
PHP Version: OS:

 

 [2006-05-02 18:18 UTC] danb at zu dot com
Description:
------------
I'm not too sure if this is a php bug or a libgd bug as I upgraded both at the same time.

This image on the site was generated under PHP-4.3.11, GD-1.8.4, and FreeType 2.0.3-7.  The file is a cached copy.
http://216.94.150.3/dynamic/header.php?text=Goals+and+Targets&color=EB6919
The font rendered to be more like Times New Roman (sans-serif) than Frutiger 55 Roman however.

The site is now running PHP-4.4.2, GD-2.0.33, and FreeType 2.1.10.   If you change the text being rendered, it consistently cuts off the last 2-3 pixels of text, although it now renders the font more correctly than before.

The server was compiled with the following config under Apache 1.3.33:
./configure  --with-apxs=/usr/local/apache/bin/apxs --enable-versioning --with-mysql --with-zlib
 --with-sablot --with-xml --with-mcrypt --with-gd --with-mcal --enable-track-vars --enable-xslt --
with-iconv-dir=/usr/local --with-xslt-sablot --enable-wddx --with-pspell --enable-gd-native-ttf --
with-png --with-jpeg --with-jpeg-dir=/usr --with-png-dir=/usr --with-ttf --with-freetype-dir=/usr 
--with-xpm-dir=/usr/X11R6/ --enable-wddx --with-pspell --with-mime-magic --without-pear --with-cur
l --enable-mbstring


Reproduce code:
---------------
The code being used to generate the code is located here:
http://www.alistapart.com/d/dynatext/heading.php.txt

No code below the $cache_folder definition has been modified.

For some reason our code file is called header.php rather than heading.php.




Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-05-03 10:51 UTC] pajoye@php.net
You configure php using "--with-gd", that means you use the bundled library. If something else is shown, you have mixed your system headers while building. Please verify your setup.

Also we need a short script with only the GD functions and a link to the TTF font you use, no function, html, etc..


 [2006-05-03 17:07 UTC] dcmbrown at shaw dot ca
test.
 [2006-05-03 17:12 UTC] danb at zu dot com
Hmm... the add comment section loses your comment if you have the same email address as the poster.  That's nice. :P

Anyways, I wasn't aware there was a bundled gd library in PHP now. I haven't been to the main http://www.php.net/manual/en/ref.image.php page in a long time and hadn't noticed the note about it.  The --with-gd option has been used as long as I've compiled it and it's always worked.  Specifying where libgd was with --with-gd=/usr fixed the chopped off text problem.

You can bogify this bug report.
 [2006-05-03 19:57 UTC] bjori@php.net
.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Jul 14 07:01:32 2025 UTC