echo "രജീഷ്" | convert -pointsize 48 label:@- image.png
gives me nothing but a series of ‘?’ marks of 48 points in the output image.
And convert -font Arial label:'Something' something.png
gives me error “convert: unable to read font `Arial'.
” instead of a nice image with ‘Something’ in Arial font.
So, what’s the solution? List the fonts available. No, fc-list
doesn’t help. You need to use the exact name in the output list of convert -list font
to work. There I see Rachana font listed as Rachana-Regular.
And then,
convert -font Rachana-Regular -pointsize 48 label:'രജീഷ്' img_magick.png
Nice!
5 responses to “ImageMagick and Unicode”
Thanks a lot. I was trying to do the same with ascii fonts(iscii fonts) to generate some random sample of text. It was able to generate for some text, but some symbols were missing! I will check these now.
My pleasure.
I had a sweat out a bit before I got the results. 🙂
convert -fill black -font Meera -pointsize 200 label:”ചൊവ്വ” 1.png
this doesn’t gives me correct output
I got this file as o/p http://s000.tinyupload.com/index.php?file_id=08152664819432768577
Is there any way to fix it ??
Thanks
Unfortunately, not. ImageMagick doesn’t support complex shaping required for Malayalam script.
You can, instead, use the `hb-view’ tool from harfbuzz suite. Simply do:
hb-view –text=”ചൊവ്വ” –font-file=/path/to/Meera.ttf –output-file=chovva.png
The trick really helped. Thank you.