Re: Re: imagettftext() test always fails.

From: Date: Sat, 23 Nov 2002 22:53:01 +0000
Subject: Re: Re: imagettftext() test always fails.
References: 1  Groups: php.qa 
Request: Send a blank email to php-qa+get-6979@lists.php.net to get a copy of this message
> > Really? It sounds very strange. > > I'm going to take a deeper look into the problem. But isn't it possible to > > draw a text with imagettftext() in true-coloured images? > > Well, there are several problems here. First of all the test font you are > using seems to be broken(?). If I modify the test to write the result image > to file I get 2 black squares 256x256. When I change the font to a working > font, the 1st test draws the text and the 2nd text is still a black 256x256 > square. I'd say there is a >50% chance that the 2nd test is 'bogus' because > your cannot use imagettftext() in true-colored images. > For your reference I am attaching the test font I am using, it is free to use > so there are licensing issues with including it with PHP. This font was > designed by Colin Viebrock and as you can see it is a fairly small file. Then what version of freetype do you use for the tests? Mine is shown below: [koizumi@roadrunner /]# freetype-config --version 9.2.3 If the test font which I created dedicatedly for the test turns out to be irregular to old versions of freetype, I have to replace the test by a more proper one, or remove it. Moriyoshi > Ilia > > > If it was not, then my test should be bogus. > > > > Anyway thanks for the further investigation. > > > > Moriyoshi > > > > "Ilia A." <ilia@prohost.org> wrote: > > > In your comments you've mentioned that a segmentation fault has been > > > fixed, on my system it never occured. Even with your patch the test still > > > fails. $im = imagecreatetruecolor(256, 256); > > > var_dump(testrun($im, $fontfile_8859)); > > > imagedestroy($im); > > > > > > returns FALSE instead of true. > > > > > > My PHP configuration flags that are GD related are as follows: > > > --with-gd --with-jpeg-dir --with-png-dir --with-ttf --with-t1lib > > > > > > Ilia > > > > > > On November 23, 2002 04:53 pm, Moriyoshi Koizumi wrote: > > > > I've just fixed this bug. Now it's ok. > > > > Please see my recent patch on gdcache.c for detail. > > > > > > > > Moriyoshi > > > > > > > > "Ilia A." <ilia@prohost.org> wrote: > > > > > The imagettftext() always fails on my machine and I see that it also > > > > > fails for a number of other people based on QA reports. The cause of > > > > > the failure is that when image is created using the > > > > > imagecreatetruecolor() function rather then imagecreate() addition of > > > > > the ttf text always fails. Is this a bogus test, bug in the code or > > > > > something else? > > > > > > > > > > Ilia

« previous php.qa (#6979) next »