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: -
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:
Status: Open Package: GD related
PHP Version: 5.3.5 OS: Debian
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: loic at lemconsulting dot fr
New email:
PHP Version: OS:

 

 [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

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Mon Jun 24 15:01:26 2019 UTC