Edit report at http://bugs.php.net/bug.php?id=51135&edit=1

 ID:               51135
 Updated by:       [email protected]
 Reported by:      sharon_correll at sil dot org
 Summary:          imagettftext does not work for characters > 99999
 Status:           Assigned
 Type:             Bug
 Package:          GD related
 Operating System: Windows Vista
 PHP Version:      5.2.12
 Assigned To:      tabe

 New Comment:

This is still happening with an up-to-date PHP_5_3 SVN checkout using
the bundled libgd. I've only tested it on Linux, but the relevant code
in libgd/gdft.c doesn't appear to be platform specific.



It's exactly what the libgd bug indicates: gdTcl_UtfToUniChar() simply
stops looking for the end of a numeric or hexadecimal entity reference
two characters earlier than it should to cover all possible Unicode
characters out to Plane 16. The patch for libgd is trivial, and I'll
attach it after I post this comment.



I've created a tarball containing a test script, a font containing Plane
1 characters (which is valid, and does work to render characters in
Plane 1 blocks in desktop applications), PNG images showing PHP and
libgd's behaviour before and after the patch, and a mockup rendering
showing roughly what this is actually meant to look like, which you can
get from:

http://www.adamharvey.name/stuff/bug51135.tar.bz2



Note that the attached patch isn't actually the whole solution, as is
clear if you compare with-patch.png to the mockup. It does make
gdTcl_UtfToUniChar() decode the entities, but there are evidently other
issues that prevent non-BMP characters from actually being rendered
properly, as libgd bug 42 notes.


Previous Comments:
------------------------------------------------------------------------
[2010-03-05 15:55:25] [email protected]

[email protected]:



Not if the bundled is used. Which is the case on windows.



Tabe, can you verify this issue please?

------------------------------------------------------------------------
[2010-03-05 15:45:14] sharon_correll at sil dot org

Thank you for the information; it's helpful to know the status.

------------------------------------------------------------------------
[2010-03-05 06:38:59] [email protected]

This is still happening in PHP_5_3, but it's not a PHP bug as such: it's
a bug in 

libgd itself. There's already an open bug in the libgd issue tracker
covering 

this issue, which still exists in the current HEAD of libgd:



http://bugs.libgd.org/?do=details&task_id=42

------------------------------------------------------------------------
[2010-03-05 06:01:03] 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 "Open". Thank you.

------------------------------------------------------------------------
[2010-02-24 22:19:58] [email protected]

or 5.3.3RC2 (http://windows.php.net/qa/)

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    http://bugs.php.net/bug.php?id=51135


-- 
Edit this bug report at http://bugs.php.net/bug.php?id=51135&edit=1

Reply via email to