xref: /PHP-8.2/ext/gd/tests/bug48801-mb.phpt (revision a375d547)
1--TEST--
2Bug #48801 (Problem with imagettfbbox)
3--EXTENSIONS--
4gd
5--SKIPIF--
6<?php
7    if(!function_exists('imageftbbox')) die('skip imageftbbox() not available');
8    if (substr(PHP_OS, 0, 3) == 'WIN') die('skip UTF-8 font file names not yet supported on Windows');
9?>
10--FILE--
11<?php
12$cwd = __DIR__;
13$font = "$cwd/Tuffy私はガラスを食べられます.ttf";
14$bbox = imageftbbox(50, 0, $font, "image");
15echo '(' . $bbox[0] . ', ' . $bbox[1] . ")\n";
16echo '(' . $bbox[2] . ', ' . $bbox[3] . ")\n";
17echo '(' . $bbox[4] . ', ' . $bbox[5] . ")\n";
18echo '(' . $bbox[6] . ', ' . $bbox[7] . ")\n";
19?>
20--EXPECTREGEX--
21\(4, 15\)
22\(16[0-1], 15\)
23\(16[0-1], -4[7-8]\)
24\(4, -4[7-8]\)
25