note 68366 added to function.imagettftext
| From: | jwe at osu1 dot php dot net | Date: | Mon, 24 Jul 2006 18:48:09 +0000 |
| Subject: | note 68366 added to function.imagettftext | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-115104@lists.php.net to get a copy of this message | ||
I found this line a little confusing:
"May include decimal numeric character references (of the form: €) to access
characters in a font beyond position 127."
I was using a font that had apostrophes and quotes stored in a non-standard position, and so they
were being rendered as spaces by imagettftext. This line seemed to suggest a solution, but it took
a while to figure it out.
Turns out, a "decimal numeric character reference" is a decimal conversion of the hex
value of the *unicode* position of the character you want. For a while I was trying ASCII positions
(I knew the ALT+ code for typing the character I needed in Windows).
In the Windows XP character map, the unicode positions are shown as U+2018 or U+201C, etc. Ignore
the U+ and convert that hex number to decimal, and then stick that in your text string with the
&# on the front and ; on the end, and pass it to imagettftext.
--Julian
----
Server IP: 66.207.199.35
Probable Submitter: 72.136.198.163
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/function.imagettftext.php
Edit -- http://master.php.net/note/edit/68366
Del: integrated -- http://master.php.net/note/delete/68366/integrated
Del: useless -- http://master.php.net/note/delete/68366/useless
Del: bad code -- http://master.php.net/note/delete/68366/bad+code
Del: spam -- http://master.php.net/note/delete/68366/spam
Del: non-english -- http://master.php.net/note/delete/68366/non-english
Del: in docs -- http://master.php.net/note/delete/68366/in+docs
Del: other reasons-- http://master.php.net/note/delete/68366
Reject -- http://master.php.net/note/reject/68366
Search -- http://master.php.net/manage/user-notes.php