Page 1 of 1
Arabic fonts rendering
Posted: 2011-06-01T14:50:43-07:00
by teebe
Hi,
I tried
Code: Select all
convert -background lightblue -fill blue -pointsize 48 -font Arial label:@arabic.utf8 label_utf8.gif
but it does not render RTL, at least.
Do there is anything else to try?
Which can be the another application that makes it right?
Thank's
Re: Arabic fonts rendering
Posted: 2011-06-01T15:26:24-07:00
by fmw42
teebe wrote:Hi,
I tried
Code: Select all
convert -background lightblue -fill blue -pointsize 48 -font Arial label:@arabic.utf8 label_utf8.gif
but it does not render RTL, at least.
Do there is anything else to try?
Which can be the another application that makes it right?
Thank's
I am not an expert on fonts and such, but I am confused, since the Arial.ttf font is not going to have Arabic characters in it. Won't you need some font that contains Arabic characters. Perhaps you can explain a bit more.
First, what version of IM are you using and what platform?
Second, is the Arial font a ttf font?
Third, can you post a link to your arabic.utf8 file or give us a short example file so others can test with it?
Fourth, was the arabic.utf8 file created with a text editor that actually supports saving the file as utf8?
Fifth, have you tested with a normal text file that does not contain Arabic characters?
Re: Arabic fonts rendering
Posted: 2011-06-01T16:53:48-07:00
by el_supremo
If you're using a recent version of ImageMagick try this:
Code: Select all
convert -background lightblue -fill blue -pointsize 48 -font Arial -direction right-to-left label:@arabic.utf8 label_utf8.gif
Pete
Re: Arabic fonts rendering
Posted: 2011-06-01T17:02:13-07:00
by fmw42
el_supremo wrote:If you're using a recent version of ImageMagick try this:
Code: Select all
convert -background lightblue -fill blue -pointsize 48 -font Arial -direction right-to-left label:@arabic.utf8 label_utf8.gif
Pete
Thanks Pete, I missed that issue. I was not sure what RTL meant. But now that you point that out, it makes sense. I believe you need IM 6.6.1-5 or higher for that option.
Fred
Re: Arabic fonts rendering
Posted: 2011-06-01T22:34:46-07:00
by teebe
True, it was not detailed:
Platform: WinXp Pro SP3
IM:
Code: Select all
convert -version
Version: ImageMagick 6.7.0-0 2011-05-20 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
Features: OpenMP
Code: Select all
identify -list format | FIND /I "SVG"
MSVG SVG rw+ ImageMagick's own SVG internal renderer
SVG SVG rw+ Scalable Vector Graphics (XML 2.4.19)
SVGZ SVG rw+ Compressed Scalable Vector Graphics (XML 2.4.19)
Original:
arabic.utf8
cmd:
Code: Select all
convert -background lightblue -fill blue -pointsize 48 -font Arial label:@arabic.utf8 label_utf8.gif
IM render
code with LTR:
Code: Select all
convert -background lightblue -fill blue -pointsize 48 -font Arial -direction right-to-left label:@arabic.utf8 label2_utf8.gif
IM render with LTR:
Re: Arabic fonts rendering
Posted: 2011-06-02T04:44:14-07:00
by albarq
i have same exact problem, i tried to save the text in .svg format and converted through IM but i faild.
any one can help?
Re: Arabic fonts rendering
Posted: 2011-06-02T08:40:58-07:00
by el_supremo
I agree that it doesn't work (with 6.6.8-6). It prints the whole string when doing LTR but when using "-direction right-to-left" it only prints the first character.
Pete
Re: Arabic fonts rendering
Posted: 2011-06-02T10:57:21-07:00
by fmw42
I get the same one character result with -direction right-to-left using IM 6.7.0.2 Q16 Mac OSX Tiger.
I believe user teebe should post a bug report and link to this topic.
Re: Arabic fonts rendering
Posted: 2011-06-02T13:56:35-07:00
by teebe
fmw42: i will do.
So, apparently the RTL option really starts from last character but stops on cr/lf. I have very little knowledge of RTL languages made by o.s. manufacturers, one weird thing i noticed is that cr/lf (or cr alone) is always on right hand side of text (comparing different word processors, editors etc etc.) While, i.e, in my work environment the character generators really invert the position of cr/lf (on left hand side in case of RTL), so for example is not possible to mix RTL and LTR languages in composition with text scroll, unless interleaved by their appropriate end of line symbol.
However: if anybody knows which stand alone RTL render has the same output of firefox (it works!) i will be very very happy.
Thanks to all.
Re: Arabic fonts rendering
Posted: 2011-06-03T13:14:06-07:00
by teebe
Update (for Arabic RTL):
Using arabic writer.exe
http://sourceforge.net/projects/arabicwriter/ the glyphs are properly aligned AFTER convert.exe
This should confirm the IM -direction right-to-left bug, as inverting with external application goes through well.
UTF-8 source label:
Code: Select all
true:
زهرة وأزواجها الخمسة
after arabic writer:
ﺔﺴﻤﺨﻟﺍ ﺎﻬﺟﺍﻭﺯﺃﻭ ﺓﺮﻫﺯ
convert.exe results:
I am not sure, but It looks like UTF-8 does not carry the information of typing direction.
Cheers
Re: Arabic fonts rendering
Posted: 2011-06-03T13:30:50-07:00
by fmw42
Re: Arabic fonts rendering
Posted: 2011-06-05T23:37:05-07:00
by teebe
Hi,
tested v6.7.0-4 but results are not good, besides direction is correct. I use Microsoft Visual Studio 2008 Version 9.0.30729.1, it compiles with no errors or warnings but i have a broken convert.exe output, both in terms of render and characters, as (in arabic) it superimposes some.
Any suggestion?
Thnaks
Re: Arabic fonts rendering
Posted: 2011-06-06T07:01:59-07:00
by teebe
As last report, I found (omiss..) rendering LTR and RTL text smooth as desired. Was a surprise of course, maybe quality can be better and usage through .ini file is not friendly, but it works.
Again, thanks all for efforts in following my question