1

Possible Duplicate:
How can I write non-English characters to an image?

I have followed both solutions listed here:

PHP function imagettftext() and unicode

but none of them worked. I used Arabic letters to be drawn into the image but they still crashed, here is the screenshot:

http://farm3.static.flickr.com/2559/5757740544_708c5ff118.jpg

I tried many ways possible to convert $text into a readable encoding, but nothing worked ! is there a possible solution for this problem ?

Community
  • 1
  • 1
JaHelia
  • 1,221
  • 1
  • 15
  • 24

1 Answers1

2

quote from php.net

If a character is used in the string which is not supported by the font, a hollow rectangle will replace the character.

the seventh parameter is the font file ... try using different font

Teneff
  • 30,564
  • 13
  • 72
  • 103
  • your answer has partially solved the problem, but the resulting text is in discrete Arabic characters not continuous as it should be, do you have any clue about that, screenshot of this result: http://farm3.static.flickr.com/2801/5757934474_0606f65599.jpg – JaHelia May 25 '11 at 08:40
  • @JaHelia what do you mean by discrete and on the screenshot looks quite well I think :) – Teneff May 25 '11 at 11:37
  • in Arabic language (unlike many other languages) characters are connected together (not letter by letter like english) – JaHelia May 25 '11 at 13:24
  • @JaHelia isn't it the same if you use the same font in some text editor – Teneff May 25 '11 at 14:09
  • nope .. look at this screenshot to clarify things: http://farm4.static.flickr.com/3512/5758642698_3e8ee79ee8_m.jpg this screenshot contains the right Arabic (connected) characters – JaHelia May 25 '11 at 14:21