How create persian or arabic text with imgaemagick ?
-
- Posts: 44
- Joined: 2014-11-28T16:19:41-07:00
- Authentication code: 6789
How create persian or arabic text with imgaemagick ?
Hi,
I read every post in internet also Imagemagick forum and in the end, i can't find a way to write Persian Or Arabic language text with imagemagick.
i see the pango and my server administrator told me, it is old and without any new update,
Is there any help for my problem?
Now, i create my text with php and gd with png file and composite that over my images.
API: php
Server: Linux
imagemagick version: lasted
thank you
I read every post in internet also Imagemagick forum and in the end, i can't find a way to write Persian Or Arabic language text with imagemagick.
i see the pango and my server administrator told me, it is old and without any new update,
Is there any help for my problem?
Now, i create my text with php and gd with png file and composite that over my images.
API: php
Server: Linux
imagemagick version: lasted
thank you
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: How create persian or arabic text with imgaemagick ?
Just put your text in a command, with "-annotate" or another mechanism. See my page http://im.snibgo.com/snutf8.htm
snibgo's IM pages: im.snibgo.com
-
- Posts: 44
- Joined: 2014-11-28T16:19:41-07:00
- Authentication code: 6789
Re: How create persian or arabic text with imgaemagick ?
Hi,
can you put complete command line for سلام ?
thank you
can you put complete command line for سلام ?
thank you
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: How create persian or arabic text with imgaemagick ?
You can do this
convert -size 200x200 xc:white -fill black -font Arial -gravity center -annotate +0+0 "سلام" result.jpg
But if you copy and paste, the text must come from a UTF8 compatible text editor and the font must support UTF8 (unicode) characters. See
http://www.imagemagick.org/Usage/text/#unicode
convert -size 200x200 xc:white -fill black -font Arial -gravity center -annotate +0+0 "سلام" result.jpg
But if you copy and paste, the text must come from a UTF8 compatible text editor and the font must support UTF8 (unicode) characters. See
http://www.imagemagick.org/Usage/text/#unicode
-
- Posts: 44
- Joined: 2014-11-28T16:19:41-07:00
- Authentication code: 6789
Re: How create persian or arabic text with imgaemagick ?
Hi fred
my result with your code with copy and paste is:
and with type myself is like it too:
i write سلام in notepad or notepad++ and copy and paste in code but result is like that too,
i create input form:
<form action="1.php" method="post" id="MyUploadForm" >
<input type="text" class="text" name="text" maxlength="20"/>
<input type="submit" id="submit-btn" value="Send" />
</form>
and type سلام and sent it, but result same.
type with arabic and persian language in imagemagick is very important, because 26 country with arabic lang and over 5 country with persian.
please help me
best regards.
my result with your code with copy and paste is:
and with type myself is like it too:
i write سلام in notepad or notepad++ and copy and paste in code but result is like that too,
i create input form:
<form action="1.php" method="post" id="MyUploadForm" >
<input type="text" class="text" name="text" maxlength="20"/>
<input type="submit" id="submit-btn" value="Send" />
</form>
and type سلام and sent it, but result same.
type with arabic and persian language in imagemagick is very important, because 26 country with arabic lang and over 5 country with persian.
please help me
best regards.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: How create persian or arabic text with imgaemagick ?
Notepad does not support UTF8 (unicode). You need to create the text in a unicode compatible text editor.
-
- Posts: 44
- Joined: 2014-11-28T16:19:41-07:00
- Authentication code: 6789
Re: How create persian or arabic text with imgaemagick ?
if i want to get text from input form, what do i do?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: How create persian or arabic text with imgaemagick ?
Your form software would have to support Unicode characters and the person posting to the form would have to use Unicode character set when typing into or pasting into the form. That has nothing to do with Imagemagick. You would have to post this question to some other forum or ask the ISP for your web site if that is supported.
-
- Posts: 44
- Joined: 2014-11-28T16:19:41-07:00
- Authentication code: 6789
Re: How create persian or arabic text with imgaemagick ?
do you get any result with arabix text?
can you tell me one of the unicode compatible text editor?
thank you
can you tell me one of the unicode compatible text editor?
thank you
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: How create persian or arabic text with imgaemagick ?
I do not know how to create arabic text. My text editor is BBEDIT, but is a Mac based editor. Perhaps you need a special font for arabic. See http://www.fontspace.com/category/arabic
-
- Posts: 44
- Joined: 2014-11-28T16:19:41-07:00
- Authentication code: 6789
Re: How create persian or arabic text with imgaemagick ?
ok ok ok,
i will try it, but i think, imagemagick developer must think about some change to create a library for arabic text.
thank you
i will try it, but i think, imagemagick developer must think about some change to create a library for arabic text.
thank you
-
- Posts: 44
- Joined: 2014-11-28T16:19:41-07:00
- Authentication code: 6789
Re: How create persian or arabic text with imgaemagick ?
can i use my own font for this command line?
if i put the some_font_name.ttf in the folder of my code, what is the code for execute my font?
if i put the some_font_name.ttf in the folder of my code, what is the code for execute my font?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: How create persian or arabic text with imgaemagick ?
-font /fullpath2/some_font_name.ttf
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: How create persian or arabic text with imgaemagick ?
For Arabic text with ImageMagic, "caption:" and "label:" can be used, with "-direction right-to-left". However, this selects glyphs for standalone characters, not joined-up characters.
The easiest solution seems to be "pango:", where "-direction right-to-left" is not needed.
The easiest solution seems to be "pango:", where "-direction right-to-left" is not needed.
Code: Select all
convert -gravity Center -size 200x200 -fill black -font Arial -pointsize 50 pango:"سلام" arabic_r5.png
snibgo's IM pages: im.snibgo.com