php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31311 getting all rectangles instead of text in some true type fonts
Submitted: 2004-12-27 13:42 UTC Modified: 2005-01-14 19:10 UTC
From: informatica at diputacionavila dot es Assigned: pajoye (profile)
Status: Not a bug Package: GD related
PHP Version: 5.0.3 OS: Fedora core 2
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: informatica at diputacionavila dot es
New email:
PHP Version: OS:

 

 [2004-12-27 13:42 UTC] informatica at diputacionavila dot es
Description:
------------
After updating from php-5.0.2 to php-5.0.3 some true type fonts show rectangles instead of text

My configure command is:

'./configure' '--with-apxs=/apache/bin/apxs' '--with-gd' '--with-zlib-dir=/usr/local' '--with-png-dir=/usr/local' '--with-jpeg-dir=/usr/local' '--with-freetype-dir=/usr/local' '--enable-track-vars' '--enable-calendar' '--enable-exif' '--with-imagick' '--with-unixODBC' '--with-mysql=/usr/local/mysql'

Reproduce code:
---------------
<?php 
Header("Content-type: image/png"); 
$gif = ImageCreate(200,200); 
$bg =  ImageColorAllocate($gif,22,222,2); 
$ellipse = ImageColorAllocate($gif,2,200,200); 
$tx = ImageColorAllocate($gif,255,255,128); 
ImageFilledRectangle($gif,0,0,200,200,$bg); 
//ImageString($gif,113,70,90,"it works !",$tx); 
$black = imagecolorallocate($gif, 0,0,0);
ImageTtfText ($gif, 20, 0, 0, 90, $black, "/font/weather.ttf","123ABCabc...");
ImagePNG($gif); 
?> 


Expected result:
----------------
Expected result is what you can see at my server with php-5.0.2

http://www.diputacionavila.es/xgarbage/gif3.php

Actual result:
--------------
Actual result is what you can see at my server with php-5.0.3

http://rh.homelinux.net/xgarbage/gif3.php

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-01-11 16:40 UTC] dbad732001 at yahoo dot com
This seems to be the same problem that I've signaled with the bug 31259, but I've the problem with the version 4.3.10 of PHP and the script it worked correctly with the version 4.3.9.
 [2005-01-14 19:10 UTC] sniper@php.net
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

Same as bug #31259


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 18 07:01:33 2024 UTC