ID:               31523
 User updated by:  schellekens at gmail dot com
 Reported By:      schellekens at gmail dot com
-Status:           Feedback
+Status:           Open
 Bug Type:         GD related
 Operating System: Windows XP Pro
 PHP Version:      4.3.9
 New Comment:

hi, i tried with the cvs version 4.3.11-dev / GD Version 2.0.28, but no
change in situation: still nasty character-spacing on win32 version. 

besides using a font/point-size of 8 in ImageTTFText() like in my
example, i tried other sizes to be sure it's not some kind of rounding
problem, and the ugly spacing kept appearing.


Previous Comments:
------------------------------------------------------------------------

[2005-01-17 18:25:54] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip



------------------------------------------------------------------------

[2005-01-15 15:10:35] schellekens at gmail dot com

To confuse things a bit: my provider upgraded our debian colocated
server yesterday to php 4.3.10, so i give you the configure line of
this version instead of 4.3.9. The situation hasn't changed though:
good text rendering on the debian (both on 4.3.9 and 4.3.10) and bad
rendering on 4.3.9-win32. I can't figure out why i don't get a
configure line on my win32 version through phpinfo(), is this common?

Configure Command of PHP Version 4.3.10-1.dotdeb.0 (from phpinfo()):

'../configure' '--prefix=/usr' '--with-apxs=/usr/bin/apxs'
'--with-regex=php' '--with-config-file-path=/etc/php4/apache'
'--disable-rpath' '--enable-memory-limit' '--disable-debug'
'--with-layout=GNU' '--enable-calendar' '--enable-sysvsem'
'--enable-sysvshm' '--enable-sysvmsg' '--enable-track-vars'
'--enable-trans-sid' '--enable-bcmath' '--with-bz2' '--enable-ctype'
'--with-db2' '--with-iconv' '--enable-exif' '--enable-filepro'
'--enable-ftp' '--enable-dbase' '--with-gettext' '--enable-mbstring'
'--with-pcre-regex' '--enable-shmop' '--enable-sockets' '--enable-wddx'
'--enable-tokenizer' '--disable-xml' '--with-expat-dir=/usr'
'--with-xmlrpc' '--enable-yp' '--with-zlib' '--without-pgsql'
'--with-kerberos=/usr' '--with-openssl=/usr' '--enable-dbx'
'--with-mime-magic' '--with-exec-dir=/usr/lib/php4/libexec'
'--disable-static' '--disable-cli' '--without-pear'
'--with-curl=shared,/usr' '--with-dom=shared,/usr'
'--with-dom-xslt=shared,/usr' '--with-dom-exslt=shared,/usr'
'--with-zlib-dir=/usr' '--with-gd=shared' '--enable-gd-native-ttf'
'--with-jpeg-dir=shared,/usr' '--with-xpm-dir=shared,/usr/X11R6'
'--with-png-dir=shared,/usr' '--with-freetype-dir=shared,/usr'
'--with-mcrypt=shared,/usr' '--with-ming=shared,/usr'
'--with-gmp=shared,/usr' '--with-imap=shared,/usr' '--with-imap-ssl'
'--with-ldap=shared,/usr' '--with-mcal=shared,/usr'
'--with-mhash=shared,/usr' '--with-mm' '--with-mysql=shared,/usr'
'--with-mysql-sock=/var/run/mysqld/mysqld.sock'
'--with-pgsql=shared,/usr' '--with-unixODBC=shared,/usr'
'--with-recode=shared,/usr' '--enable-xslt=shared'
'--with-xslt-sablot=shared,/usr' '--with-snmp=shared'
'--enable-ucd-snmp-hack' '--with-sybase-ct=shared,/usr'
'--with-ttf=shared,/usr' '--with-t1lib=shared,/usr'

------------------------------------------------------------------------

[2005-01-14 23:48:30] [EMAIL PROTECTED]

Please add the configure line of PHP in the debian machine.


------------------------------------------------------------------------

[2005-01-14 14:51:44] schellekens at gmail dot com

> also 2 versions of the same script.

i mean 2 rendering output images by the same script on win32 vs
debian...

------------------------------------------------------------------------

[2005-01-14 14:49:25] schellekens at gmail dot com

hi again, here's an example script.  also 2 versions of the same
script.

the wrong rendering using php 4.3.9 win32:
http://www.europe-re.com/snd/incorrect.png

the correct rendering using php 4.3.9 Debian:
http://www.europe-re.com/snd/correct.png

the script:

<?php
        // ================================
        // Parameters
        // ================================

        $imgw   = 200;
        $imgh   = 20;
        $fcol   = "000000";
        $bcol   = "e0e0e0";
        $fsiz   = 8;
        $ftxt   = "Beware of weird foggy bibberish spam";
        $xpos   = 10;
        $ypos   = 13;
        $ftyp   = str_replace("\\", "/", getcwd()) . "/fonts/arial.ttf";        
        //
font to use

        // ================================
        // create from scratch
        // ================================

        $imgd   = ImageCreate ($imgw, $imgh);
        $bcol   = ImageColorAllocate ($imgd, hexdec(substr($bcol, 0, 2)),
hexdec(substr($bcol, 2, 2)), hexdec(substr($bcol, 4, 2)));
        $fcol   = ImageColorAllocate ($imgd, hexdec(substr($fcol, 0, 2)),
hexdec(substr($fcol, 2, 2)), hexdec(substr($fcol, 4, 2)));

        ImageFill ($imgd, 0, 0, $bcol);
        ImageTTFText ($imgd, $fsiz, $rota, $xpos+$xoff, $ypos, $fcol, $ftyp,
$ftxt);

        // ================================
        // Output het plaatje
        // ================================

        header                  ("Content-type: image/png");
        ImagePNG                ($imgd);
        ImageDestroy    ($imgd);
        exit();
?>

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/31523

-- 
Edit this bug report at http://bugs.php.net/?id=31523&edit=1

Reply via email to