Patch bug48555 for Testing related Bug #61480
Patch version 2012-03-22 21:07 UTC
Return to Bug #61480 |
Download this patch
Patch Revisions:
Developer: mattficken@php.net
--- C:/Users/v-mafick.REDMOND/Downloads/php-5.3-src-r324324/php-5.3-src-r324324/ext/gd/tests/bug48555.phpt Tue Jul 28 12:16:02 2009
+++ C:/php-sdk/php-5.3-src-r324324/ext/gd/tests/bug48555.phpt Wed Mar 21 13:03:05 2012
@@ -4,9 +4,20 @@
<?php
if(!extension_loaded('gd')){ die('skip gd extension not available'); }
if(!function_exists('imageftbbox')) die('skip imageftbbox() not available');
+
+ ob_start();
+ phpinfo(INFO_MODULES);
+ $info = ob_get_clean();
+
+ preg_match("/FreeType Version => (\d+).(\d+).(\d+)/", $info, $m);
+
+ if (!($m[1]>=2 && ($m[2]>4||($m[2]==4&&$m[3]>=3)))) {
+ die('skip freetype version is too old. test requires FreeType 2.4.3 or higher');
+ }
+
?>
--FILE--
-<?php
+<?php
$cwd = dirname(__FILE__);
$font = "$cwd/Tuffy.ttf";
$box = ImageFTBBox(14, 0, $font, "Text without line-break");
@@ -15,5 +26,5 @@
echo 'Top with line-break: ' . $box[7] . "\n";
?>
--EXPECTF--
-Top without line-break: -14
-Top with line-break: -14
+Top without line-break: -15
+Top with line-break: -15
|