From a25c57e93f9fccee101fed7573ce6569a919a0bc Mon Sep 17 00:00:00 2001 From: Lionel Date: Thu, 4 Jan 2024 23:18:48 +0100 Subject: [PATCH] Modification des polices MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Le .woff n'est pas accepté sur toutes les configurations serveur --- core/vendor/captcha/captcha.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/vendor/captcha/captcha.php b/core/vendor/captcha/captcha.php index df7270c..c8e5c8d 100644 --- a/core/vendor/captcha/captcha.php +++ b/core/vendor/captcha/captcha.php @@ -13,7 +13,7 @@ $char2 = mt_rand( 0, strlen($chars) - 1 ); $_SESSION['captcha'] = md5((int)$char1 + (int)$char2); // polices utilisées -$fonts = glob('polices/*.woff'); +$fonts = glob('polices/*.ttf'); // création de l'image captcha $image = imagecreatefrompng('captcha.png'); // couleurs des caractères @@ -26,9 +26,9 @@ $colors = array ( imagecolorallocate($image, 238, 238, 238), imagecolorallocate($image, 255, 255, 51) ); // positions, polices, caractères et couleurs randomisées imagettftext($image, 28, -10, 7, 50, random($colors), ABSPATH .'/'. random($fonts), $char1); -imagettftext($image, 28, 0, 50, 50, random($colors), ABSPATH .'/'. 'polices/Eskiula.woff', '+'); +imagettftext($image, 28, 0, 50, 50, random($colors), ABSPATH .'/'. 'polices/Eskiula.ttf', '+'); imagettftext($image, 28, -35, 75, 50, random($colors), ABSPATH .'/'. random($fonts), $char2); -imagettftext($image, 28, 0, 125, 50, random($colors), ABSPATH .'/'. 'polices/Eskiula.woff', '='); +imagettftext($image, 28, 0, 125, 50, random($colors), ABSPATH .'/'. 'polices/Eskiula.ttf', '='); header('Content-Type: image/png'); imagepng($image);