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

some font not working whay? #25

Closed idrisalshikh closed 5 years ago

idrisalshikh commented 5 years ago

hi I try the example with attached font but the image show without text Uthmanic.zip without reshaper pil_text_font with reshaper pil_text_font

ravarage commented 5 years ago

if you open your fonts with fontforge you will see with is wrong, your font use u0644.init u0644.zz04 instead of traditional known UTF 8 General standard , there are two ways to get your font to work first if we manage to python read after dot which something I wasnt able to do it second use Adobe glyph name which I have no Idea how that work but it seem more unique I dont know how to use it , but its make sense if we manage to it , Mr.Abdullah Diab is smart guy he might be able to it but you can use his code and what I told you to figure something out, I am also trying but I am not a pro

ravarage commented 5 years ago

you can install libraqm , and when you draw text , write direction = "rtl" and you wont need any tools for ubuntu based system this line will get the job done for you sudo apt-get install libraqm-dev for mac I think its almost the same but for windows you have to build it yourself