Skip to content

Devanagari font not rendered correctly #3191

Description

@shubhampateliitm

What did you do?

I am trying to print Devanagari text on the image. The text is printing on the image. But, it is not appearing the way it supposed to be. Devanagari is not like ordinary language script. In UTF-8 standard some particular characters when appear together show different character(The new character that formed is not define in UTF-8). Take a look at this doc for reference look this doc : https://www.unicode.org/versions/Unicode6.0.0/ch09.pdf#G12284 and variant shape section of this https://www.unicode.org/standard/where/.

Python Code :

from PIL import Image, ImageDraw, ImageFont

img = Image.new('RGB', (100, 30), color = (73, 109, 137))

fnt = ImageFont.truetype('NotoSans-Regular.ttf', 15)
d = ImageDraw.Draw(img)
d.text((10,10), "यात्रा", font=fnt, fill=(255, 255, 0))
img.save('pil_text_font.png')

Eventually Ubuntu also suffer from the same problem.

Please try to rectify this issue. Since otherwise it will changing whole spelling of words which is not fair to any Devanagari reader(Devanagari is the script for languages such Hindi, Marathi, Nepali).

Yatra shouldn't be like.
pil_text_font
It should be like
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugAny unexpected behavior, until confirmed feature.Font Rendering

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions