php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #65610 imagettftext("",,,,,,"مەن كىم")
Submitted: 2013-09-03 18:44 UTC Modified: 2013-10-15 11:54 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: 309165145 at qq dot com Assigned:
Status: No Feedback Package: GD related
PHP Version: 5.4Git-2013-09-03 (Git) OS: xp/win7 /win8
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: 309165145 at qq dot com
New email:
PHP Version: OS:

 

 [2013-09-03 18:44 UTC] 309165145 at qq dot com
Description:
------------
---
From manual page: http://www.php.net/function.imagettftext#refsect1-function.imagettftext-description
$text="مەن كىم"
---


Test script:
---------------
<?php
// Set the content-type
//header('Content-Type: image/gif');

// Create the image
$im = imagecreatetruecolor(400, 30);

// Create some colors
$white = imagecolorallocate($im, 255, 255, 255);
$grey = imagecolorallocate($im, 128, 128, 128);
$black = imagecolorallocate($im, 0, 0, 0);
imagefilledrectangle($im, 0, 0, 399, 29, $white);

// The text to draw
$text = 'مەن كىم';
// Replace path by your own font path
$font = 'ALKATIP.ttf';

// Add some shadow to the text
imagettftext($im, 20, 0, 11, 21, $grey, $font, $text);

// Add the text
imagettftext($im, 20, 0, 10, 20, $black, $font, $text);

// Using imagepng() results in clearer text compared with imagejpeg()
imagegif($im,"my.gif");
imagedestroy($im);
?>

<img src='my.gif'>



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-09-03 18:56 UTC] requinix@php.net
-Status: Open +Status: Feedback
 [2013-09-03 18:56 UTC] requinix@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.


What bug are you trying to report? I tried your script with Windows' Arial.ttf and 
it worked just fine for me.
 [2013-10-15 11:54 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 14:01:31 2024 UTC