1

I am using termux. All packages are upgraded and Updated.I am trying to print hindi text on Images From last 2 Days. Here is what i want to write. शनिवार and this is what pillow print on Image ‌शनवािर . How to Solver this. I am installed harfbuzz, Freebidi & Libraqm but don't know how to use them please Help Me. I am newbiw to Python. Please share what code i should write here is the code.

from PIL import Image, ImageDraw, ImageFont
 import WebPanchangExtractor as WPE
 import harfbuzz as hb

 mystr = WPE.nakshatras[12].lstrip().rstrip()


 img = Image.new('RGB', (1280, 720), color = (73, 109, 137))

 fnt = ImageFont.truetype('./Fonts/NirmalaB.ttf', 200)
 d = ImageDraw.Draw(img)
 d.text((50,50),mystr, font=fnt, fill=(255, 255, 0))
 print('Process Done')
 img.save('pil_text_font.png')

Thanks for Your Help in Advance.. ❤️

N1NG4
  • 171
  • 1
  • 2
  • 8
  • https://pillow.readthedocs.io/en/stable/reference/ImageFont.html#PIL.ImageFont.truetype documents how you can use raqm in your code, through the layout_engine argument. ```fnt = ImageFont.truetype('./Fonts/NirmalaB.ttf', 200, layout_engine=ImageFont.LAYOUT_RAQM)``` – radarhere Jul 21 '20 at 11:49

0 Answers0