Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions docs/reference/ImageDraw.rst
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,20 @@ Methods

.. versionadded:: 6.0.0

.. note:: **Complex scripts.** When libraqm is available, Pillow
performs shaping and applies the bidirectional algorithm itself, so
do not pre-process text with ``arabic_reshaper`` and ``python-bidi``
first: the text would be shaped and reordered twice, and the result
is incorrect. ``arabic_reshaper`` also drops diacritics. This
pre-processing is only needed on builds without libraqm, so check
``PIL.features.check("raqm")`` at runtime, in the environment doing
the rendering, to decide whether it is needed::

from PIL import features

if not features.check("raqm"):
text = get_display(arabic_reshaper.reshape(text))

:param stroke_width: The width of the text stroke.

.. versionadded:: 6.2.0
Expand Down