]> granicus.if.org Git - php/commitdiff
Fix FreeType tests using UTF-8 font file names
authorChristoph M. Becker <cmb@php.net>
Fri, 23 Sep 2016 13:22:45 +0000 (15:22 +0200)
committerChristoph M. Becker <cmbecker69@gmx.de>
Fri, 23 Sep 2016 13:49:21 +0000 (15:49 +0200)
UTF-8 font file names are not yet supported on Windows[1], so we're skipping
the respective tests on this platform, but enable them on other platforms.

[1] <http://news.php.net/php.internals.win/1142>

ext/gd/tests/bug48732-mb.phpt
ext/gd/tests/bug48801-mb.phpt

index 7713e511900c02f760f530fe05350d30edf0a894..42871ee206c6fe2c41591736a57337625e5cef1f 100644 (file)
@@ -4,12 +4,8 @@ Bug #48732 (TTF Bounding box wrong for letters below baseline)
 <?php
        if(!extension_loaded('gd')){ die('skip gd extension not available'); }
        if(!function_exists('imagefttext')) die('skip imagefttext() not available');
-       if (substr(PHP_OS, 0, 3) != 'WIN') {
-           die('skip.. only for Windows');
-       }
+       if (substr(PHP_OS, 0, 3) == 'WIN') die('skip UTF-8 font file names not yet supported on Windows');
 ?>
---XFAIL--
-seems freetype issue, to investigate
 --FILE--
 <?php
 $cwd = dirname(__FILE__);
@@ -24,4 +20,4 @@ echo 'Left Bottom: (' . $bbox[0]  . ', ' . $bbox[1] . ')';
 --CLEAN--
 <?php @unlink(dirname(__FILE__) . '/bug48732私はガラスを食べられます.png'); ?>
 --EXPECTF--
-Left Bottom: (0, 47)
+Left Bottom: (0, 46)
index c2b6b455abdac64b64447fe63513ac2512fceeb9..a2f6d28a820480b37caf40b0167cc6a8c654e33f 100644 (file)
@@ -4,6 +4,7 @@ Bug #48801 (Problem with imagettfbbox)
 <?php
        if(!extension_loaded('gd')){ die('skip gd extension not available'); }
        if(!function_exists('imageftbbox')) die('skip imageftbbox() not available');
+       if (substr(PHP_OS, 0, 3) == 'WIN') die('skip UTF-8 font file names not yet supported on Windows');
 ?>
 --FILE--
 <?php