mpcabd / python-arabic-reshaper

Reconstruct Arabic sentences to be used in applications that don't support Arabic
MIT License
398 stars 80 forks source link

Enabling harakat breaks everything #35

Closed hafarooki closed 4 years ago

hafarooki commented 5 years ago

Without harakaat: image With harakat: image

mpcabd commented 5 years ago

Hi @m-macaskill,

What font are you using? What rendering system are you using to render those images? I suspect it's one of those that's breaking things for you, as the reshaper itself doesn't have a problem with Harakat, and maps them properly, but then it's all up to the font and rendering system to do their job perfectly.

hafarooki commented 5 years ago

Andalus font, and using Pillow. I managed to get it working using Java AWT and the reshaper this is based on. It still doesn't look as good in either program as it does in Microsoft word though. Do you know of a better rendering system?

mpcabd commented 4 years ago

Unfortunately I am not aware of other systems for Python, but if your end result is just images, you can maybe use selenium to generate HTML/SVG pages that a browser can display, then grab the rendered output from the browser and save it.