1

Possible Duplicate:
How can I write Non English Characters such as Arabic or Persian characters into an image?

I wrote this question before but with out answers or views

here write Arabic to image error

question now is how to write good word in Arabic

mean

if I want to write احمد

result is ا ح م د

between word is not spaces but ttf font cut every letter alone

mean

example this letter ح

in this beginning or center of word wrote as ex : محم حم

in the end of word wrote like بلح

Is there way to do this on image?

I use this fonts tahoma.ttf , arial.ttf

Cœur
  • 37,241
  • 25
  • 195
  • 267
Passer By
  • 181
  • 1
  • 11
  • Made sure utf-8 is the encoding of your php-file? – OptimusCrime Oct 17 '11 at 10:46
  • yes it's , if not it will not show my word in arabic , he did this but with space between letters – Passer By Oct 17 '11 at 11:03
  • if you already asked this but got no answers try to improve your previous question but don't repost it. edit your question from yesterday, try to give more information or to rephrase it if somebody doesn't understand - if that still doesn't help be active on SO and help other users so you get enought reputation to open a bounty on your question. (i would like to vote to close this as duplicate, but i'm out of votes for today...) – oezi Oct 17 '11 at 14:13
  • thanks for answer :) , but i didn't post this question because no answer , but because only few people saw it too , and today i add examples about problem , ( if i post question and few people watch it , can peoble see previous question or ignore it because its old question ) , thank you again – Passer By Oct 17 '11 at 15:02
  • 1
    you only need 24 more reputation to open a bounty, tahts just 3 upvotes on answers - try to get that and open a bounty, this will draw attention on your question so you'll get a lot more views and hopefully some good answers. also take a look at the FAQ: http://stackoverflow.com/faq#bounty – oezi Oct 18 '11 at 09:22
  • Thank you @oezi for help :) , i think my problem is font problem , because it happen with me in photoshop but not with tahoma,or arial fonts , i will check other fonts , best regards – Passer By Oct 18 '11 at 10:54

1 Answers1

0

Might be a limitation of the font - I did it using koodak.ttf (a free font) and had no spacing issues.

I think what I did for a project a long time ago was to loop through the string (an example used here) and use a for loop, or possibly imagettfbbox to measure the width of each character to output the letters in the correct spacing.

keif
  • 580
  • 4
  • 17