improve docs for CTL

This commit is contained in:
Fahad Al-Saidi 2016-12-14 11:05:32 +04:00 committed by wiredfool
parent 538cec323b
commit 6dc4c7ea06
2 changed files with 18 additions and 6 deletions

View File

@ -240,8 +240,12 @@ Methods
the number of pixels between lines. the number of pixels between lines.
:param align: If the text is passed on to multiline_text(), :param align: If the text is passed on to multiline_text(),
"left", "center" or "right". "left", "center" or "right".
:param direction: Direction of the text. It can be 'rtl', 'ltr', 'ttb' or 'btt. :param direction: Direction of the text. It can be 'rtl', 'ltr', 'ttb' or 'btt'.
:param features: A list of font features used for text layout. For example, 'ligature, kerning, Medial ...etc. :param features: A list of font feature to be used during text layout.
This is usually used to turn on optional font features that are not enabled by
default, for example 'dlig' or 'ss01', but can be also used to turn off default
font features for example '-liga' to disable ligatures or '-kern' to disable kerning.
To get all supported features, see https://www.microsoft.com/typography/otspec/featurelist.htm
.. py:method:: PIL.ImageDraw.Draw.multiline_text(xy, text, fill=None, font=None, anchor=None, spacing=0, align="left", .. py:method:: PIL.ImageDraw.Draw.multiline_text(xy, text, fill=None, font=None, anchor=None, spacing=0, align="left",
direction=None, features=[]) direction=None, features=[])
@ -254,8 +258,12 @@ Methods
:param font: An :py:class:`~PIL.ImageFont.ImageFont` instance. :param font: An :py:class:`~PIL.ImageFont.ImageFont` instance.
:param spacing: The number of pixels between lines. :param spacing: The number of pixels between lines.
:param align: "left", "center" or "right". :param align: "left", "center" or "right".
:param direction: Direction of the text. :param direction: Direction of the text. It can be 'rtl', 'ltr', 'ttb' or 'btt'.
:param features: Font features used for text layout. :param features: A list of font feature to be used during text layout.
This is usually used to turn on optional font features that are not enabled by
default, for example 'dlig' or 'ss01', but can be also used to turn off default
font features for example '-liga' to disable ligatures or '-kern' to disable kerning.
To get all supported features, see https://www.microsoft.com/typography/otspec/featurelist.htm
.. py:method:: PIL.ImageDraw.Draw.textsize(text, font=None, spacing=0) .. py:method:: PIL.ImageDraw.Draw.textsize(text, font=None, spacing=0)

View File

@ -63,8 +63,12 @@ Methods
driver prefers; if empty, the renderer may return either driver prefers; if empty, the renderer may return either
mode. Note that the mode is always a string, to simplify mode. Note that the mode is always a string, to simplify
C-level implementations. C-level implementations.
:param direction: Direction of the text. :param direction: Direction of the text. It can be 'rtl', 'ltr', 'ttb' or 'btt'.
:param features: A list of font features used for text layout. :param features: A list of font feature to be used during text layout. This is
usually used to turn on optional font features that are not enabled by default,
for example 'dlig' or 'ss01', but can be also used to turn off default font
features for example '-liga' to disable ligatures or '-kern' to disable kerning.
To get all supported features, see https://www.microsoft.com/typography/otspec/featurelist.htm
.. versionadded:: 1.1.5 .. versionadded:: 1.1.5
:return: An internal PIL storage memory instance as defined by the :return: An internal PIL storage memory instance as defined by the