I needed to render some RTL Arabic text. I tried gd2 and ImageMagick without luck as they they seem to use freetype, kept trying to find a work arround, by flipping words, or using different fonts, but without luck, until I learned about pango-view.
so I gave pango, pango-view a try.
Install it:
on linux, you can use yum or dpkg.
on Mac OS, I used macports, sudo port install pango
.
Try it:
Create a text file with some Arabic content, for example “letter.txt”
run the command:
pango-view letters.txt --background=transparent -q -o letters.png
If every thing ran smoothly, you will get something like this.
Good luck with pango-view
Hi, I just mentiened that if we display the text, the saved image is no longer transparent.
So it it imperative to use the -q parameter to have trancparency.
Assalamo Allaikum,You saved so much of my time. Amazing post! Keep it coming.
0 Pingbacks