php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #54149 imagettftext not handling Tibetan letters
Submitted: 2011-03-03 12:43 UTC Modified: 2021-09-22 10:21 UTC
Votes:2
Avg. Score:3.5 ± 0.5
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: loic at lemconsulting dot fr Assigned: cmb (profile)
Status: Duplicate Package: GD related
PHP Version: 5.3.5 OS: Debian
Private report: No CVE-ID: None
 [2011-03-03 12:43 UTC] loic at lemconsulting dot fr
Description:
------------
---
From manual page: http://www.php.net/function.imagettftext
---


Test script:
---------------
mb_language('uni');
mb_internal_encoding('UTF-8');

header('Content-type: image/png');
$im = imagecreatetruecolor(400, 30);
$white = imagecolorallocate($im, 255, 255, 255);
$black = imagecolorallocate($im, 0, 0, 0);
imagefilledrectangle($im, 0, 0, 399, 29, $white);

// Getting text from url :
$text = $_GET[tib];
$font = 'fonts/tibetanmachine.ttf';

//call to imagettftext
imagettftext($im, 20, 0, 10, 20, $black, $font, $text);

imagepng($im);
imagedestroy($im);

Expected result:
----------------
Expected image displaying a sole Tibetan letter (UTF8) : རྟྱི་

Actual result:
--------------
Here is an example :
http://www.montibet.com/tib2png.php?tib=%E0%BD%A2%E0%BE%9F%E0%BE%B1%E0%BD%B2%E0%BC%8B

Imagettftext renders some ར་ + mixed letters from these: དྱི་




Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-09-22 10:21 UTC] cmb@php.net
-Status: Open +Status: Duplicate -Assigned To: +Assigned To: cmb
 [2021-09-22 10:21 UTC] cmb@php.net
This is apparently about combining characters, and as such a
duplicate of bug #34670.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 16:01:28 2024 UTC