mpcabd / python-arabic-reshaper

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

font type not applied to image #64

Closed mjhasani closed 3 years ago

mjhasani commented 3 years ago

Hi I used reshaper library as below:

reshaper_ = arabic_reshaper.ArabicReshaper( arabic_reshaper.config_for_true_type_font( './path/to/font.ttf', arabic_reshaper.ENABLE_ALL_LIGATURES ) ) axis.settitle(reshaper.reshape( title )[::-1] )

but the font not applied to image title.

mpcabd commented 3 years ago

Hello, the reshaper is not responsible for rendering anything, the option you used config_for_true_type_font is just so that the reshaper doesn't use glyphs that your font does not support. You still need to render the reshaped text using your font in whatever library you're using for rendering (matplotlib in your case).