@@ -78,9 +78,8 @@ image_draw.text((10,10), bidi_text, fill=(255,255,255,128))
7878You can configure the reshaper to your preferences, it has the following
7979settings defined:
8080
81- * ` language ` (Default: ` 'Arabic' ` ): Currently it's ignored, but the reshaper
82- might be extended in the future to work with other languages that use the
83- Arabic script (Farsi, Urdu, etc.)
81+ * ` language ` (Default: ` 'Arabic' ` ): Ignored, the reshaper works with Arabic,
82+ Farsi, and Urdu, and most probably all other languages that use Arabic script.
8483* ` support_ligatures ` (Default: ` True ` ): When this is set to ` False ` , the
8584reshaper will not replace any ligatures, otherwise it will replace enabled
8685ligatures.
@@ -94,6 +93,14 @@ previous letter.
9493will delete the Tatweel character (U+0640) from the text before reshaping, this
9594can be useful when you want to support ligatures and don't care about Tatweel
9695getting deleted.
96+ * ` shift_harakat_position ` (Default ` False ` ): Whether to shift the Harakat
97+ (Tashkeel) one position so they appear correctly when string is reversed, this
98+ might solve the problem of Tashkeel in some systems, although for ` PIL.Image `
99+ for example, this is not needed.
100+ * ` support_zwj ` (Default ` True ` ): Whether to support ZWJ (` U+200D ` ) or not.
101+ * ` use_unshaped_instead_of_isolated ` (Default ` False ` ): Use unshaped form
102+ instead of isolated form, useful in some forms that are missing the isolated
103+ form of letters.
97104
98105Besides the settings above, you can enable/disable supported ligatures. For a
99106full list of supported ligatures and their default status check the file
@@ -152,16 +159,12 @@ define an environment variable with the name
152159to the configuration file. This way the reshape function will pick it
153160automatically, and you won't have to change your old code.
154161
155- ## Known Issue
162+ ## Tashkeel/Harakat issue
156163
157- When using a library/app that doesn't support right-to-left text rendering,
158164[ Harakat or Tashkeel] ( http://en.wikipedia.org/wiki/Arabic_diacritics#Tashkil_.28marks_used_as_phonetic_guides.29 )
159- cannot be supported, because their unicode characters are non-spacing marks
160- (i.e. they don't take space, they are rendered in the same space of the
161- character before them), which means that when you keep them and pass the
162- reshaped text to ` bidi.algorithm.get_display ` , they will end up being rendered
163- on the next character not the character they should be on as the text is
164- reversed.
165+ might not show up properly in their correct place, depending on the application
166+ or the library that is doing the rendering for you, so you might want to enable
167+ the ` shift_harakat_position ` option if you face this problem.
165168
166169## License
167170
@@ -178,6 +181,27 @@ https://github.com/mpcabd/python-arabic-reshaper/tarball/master
178181
179182## Version History
180183
184+ ### 2.0.14
185+
186+ * New option ` use_unshaped_instead_of_isolated ` to get around some fonts missing the isolated form for letters.
187+
188+ ### 2.0.13
189+
190+ ** BROKEN** please make sure not to use this version.
191+
192+ ### 2.0.12
193+
194+ * Updated letters and ligatures
195+ * New option ` shift_harakat_position ` to try to get around the Tashkeel problem
196+
197+ ### 2.0.11
198+
199+ * Proper support for ZWJ
200+
201+ ### 2.0.10
202+
203+ * Fix Shadda ligatures
204+
181205### 2.0.9
182206
183207* Added support for ZWJ (Zero-width Joiner) (U+200D)
0 commit comments