Annotation of embedaddon/php/ext/gd/tests/bug48732.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #48732 (TTF Bounding box wrong for letters below baseline)
! 3: --SKIPIF--
! 4: <?php
! 5: if(!extension_loaded('gd')){ die('skip gd extension not available'); }
! 6: if(!function_exists('imagefttext')) die('skip imagefttext() not available');
! 7: ?>
! 8: --FILE--
! 9: <?php
! 10: $cwd = dirname(__FILE__);
! 11: $font = "$cwd/Tuffy.ttf";
! 12: $g = imagecreate(100, 50);
! 13: $bgnd = imagecolorallocate($g, 255, 255, 255);
! 14: $black = imagecolorallocate($g, 0, 0, 0);
! 15: $bbox = imagettftext($g, 12, 0, 0, 20, $black, $font, "ABCEDFGHIJKLMN\nopqrstu\n");
! 16: imagepng($g, "$cwd/bug48732.png");
! 17: echo 'Left Bottom: (' . $bbox[0] . ', ' . $bbox[1] . ')';
! 18: ?>
! 19: --CLEAN--
! 20: <?php @unlink(dirname(__FILE__) . '/bug48732.png'); ?>
! 21: --EXPECTF--
! 22: Left Bottom: (0, 47)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>