1--TEST-- 2Bug #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"); 16imagepng($g, "$cwd/bug48732.png"); 17echo 'Left Bottom: (' . $bbox[0] . ', ' . $bbox[1] . ')'; 18?> 19--CLEAN-- 20<?php @unlink(dirname(__FILE__) . '/bug48732.png'); ?> 21--EXPECTF-- 22Left Bottom: (0, 46) 23