0

I am new to drawing text over an image. I am trying to draw emojis and non-english characters (e.g. Russian, Greek, Arabic etc.) using wand.image.Image.pseudo method in a python script. In this method, I am passing pango command as value for pseudo argument as below -

image.pseudo(width=image.width, height=image.height, pseudo='pango:Привет мир ')

Above statement draws the text successfully but I can not align the text as required.

I tried using -define pango:align=right as mentioned here - https://imagemagick.org/script/formats.php#pseudo but did not work.

Can anyone please suggest me how to do pass all definition inside pseudo method?

Thanks in advance.

1 Answers1

0

Try setting the option before reading the pseudo format.

image.options['pango:align'] = 'right'
image.pseudo(width=image.width, height=image.height, pseudo='pango:Привет мир ')
emcconville
  • 23,800
  • 4
  • 50
  • 66
  • Thank you @emcconville. `image.options` is a very good idea and it worked for 'pango:indent' but not with alignment. I have checked that other pango options defined in imagemagick.org site are also not working. – Anirban Ghosh Jan 09 '20 at 09:35