1--TEST-- 2Bug #48732 (TTF Bounding box wrong for letters below baseline) 3--EXTENSIONS-- 4gd 5--SKIPIF-- 6<?php 7 if(!function_exists('imagefttext')) die('skip imagefttext() not available'); 8 if (substr(PHP_OS, 0, 3) == 'WIN') die('skip UTF-8 font file names not yet supported on Windows'); 9 if (!(imagetypes() & IMG_PNG)) { 10 die("skip No PNG support"); 11 } 12?> 13--FILE-- 14<?php 15$cwd = __DIR__; 16$font = "$cwd/Tuffy私はガラスを食べられます.ttf"; 17$g = imagecreate(100, 50); 18$bgnd = imagecolorallocate($g, 255, 255, 255); 19$black = imagecolorallocate($g, 0, 0, 0); 20$bbox = imagettftext($g, 12, 0, 0, 20, $black, $font, "ABCEDFGHIJKLMN\nopqrstu\n"); 21imagepng($g, "$cwd/bug48732私はガラスを食べられます.png"); 22echo 'Left Bottom: (' . $bbox[0] . ', ' . $bbox[1] . ')'; 23?> 24--CLEAN-- 25<?php @unlink(__DIR__ . '/bug48732私はガラスを食べられます.png'); ?> 26--EXPECT-- 27Left Bottom: (0, 46) 28