Skip to content

Releases: mpcabd/python-arabic-reshaper

v3.0.0

10 Jan 14:42
Compare
Choose a tag to compare

No more Python 2.x support.

v2.1.4

21 Sep 21:38
Compare
Choose a tag to compare

Fixed fonttools requirement for Python 2.

Fixed a warning

04 Nov 18:35
Compare
Choose a tag to compare

v2.1.0 - config_for_true_type_font

27 Jun 19:57
e27f14f
Compare
Choose a tag to compare

Settings based on a TrueType® font

If you intend to render the text in a TrueType® font, you can tell the library
to generate its configuration by reading the font file to figure out what's
supported in the font and what's not.

To use this feature you need to install the library with an extra option
(not necessary when you install it with conda):

pip install --upgrade arabic-reshaper[with-fonttools]

Then you can use the reshaper like this:

import arabic_reshaper

reshaper = arabic_reshaper.ArabicReshaper(
    arabic_reshaper.config_for_true_type_font(
        '/path/to/true-type-font.ttf',
        arabic_reshaper.ENABLE_ALL_LIGATURES
    )
)

This will parse the font file, and figure out what ligatures it supports and enable them,
as well as whether it has isolated forms or use_unshaped_instead_of_isolated should be
enabled.

The second parameter to config_for_true_type_font can be one of

  • ENABLE_NO_LIGATURES
  • ENABLE_SENTENCES_LIGATURES
  • ENABLE_WORDS_LIGATURES
  • ENABLE_LETTERS_LIGATURES
  • ENABLE_ALL_LIGATURES (default)

which controls what ligatures to look for, depending on your usage,
see default-config.ini to know what ligatures are there.

v2.0.15

19 Jun 15:43
67b8709
Compare
Choose a tag to compare

Same as v2.0.14 but different license.

New option `use_unshaped_instead_of_isolated`

24 Nov 16:20
Compare
Choose a tag to compare

New option use_unshaped_instead_of_isolated to get around some fonts missing the isolated form for letters.

v2.0.11

21 Nov 20:09
Compare
Choose a tag to compare
Proper support for ZWJ

v2.0.10

20 Nov 21:51
Compare
Choose a tag to compare
Fix Shadda ligatures

v2.0.8

17 Jun 18:11
Compare
Choose a tag to compare
More tests + delete_tatweel

* Add `delete_tatweel`
* Add more test cases

v2.0.6

16 Jun 18:29
Compare
Choose a tag to compare
Fix a bug with Harakat breaking the reshaping

- Write two small unit tests, more to come
- Move letters and ligatures to separate files for readability
- Move package to its own folder for readability