Doc changes/additions

This commit is contained in:
wiredfool 2017-06-29 07:02:02 -07:00
parent 90a9913705
commit 9f7aae3505
2 changed files with 103 additions and 24 deletions

View File

@ -240,16 +240,28 @@ Methods
the number of pixels between lines.
:param align: If the text is passed on to multiline_text(),
"left", "center" or "right".
:param direction: Direction of the text. It can be 'rtl', 'ltr', 'ttb' or 'btt'. Requires libraqm
: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
:param direction: Direction of the text. It can be 'rtl' (right to
left), 'ltr' (left to right), 'ttb' (top to
bottom) or 'btt' (bottom to top). Requires
libraqm.
.. versionadded:: 4.2.0
:param features: A list of OpenType font features 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
Requires libraqm.
.. versionadded:: 4.2.0
.. 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=None)
Draws the string at the given position.
@ -259,15 +271,28 @@ Methods
:param font: An :py:class:`~PIL.ImageFont.ImageFont` instance.
:param spacing: The number of pixels between lines.
:param align: "left", "center" or "right".
:param direction: Direction of the text. It can be 'rtl', 'ltr', 'ttb' or 'btt'. Requires libraqm.
: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
:param direction: Direction of the text. It can be 'rtl' (right to
left), 'ltr' (left to right), 'ttb' (top to
bottom) or 'btt' (bottom to top). Requires
libraqm.
.. versionadded:: 4.2.0
:param features: A list of OpenType font features 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
Requires libraqm.
.. py:method:: PIL.ImageDraw.Draw.textsize(text, font=None, spacing=0)
.. versionadded:: 4.2.0
.. py:method:: PIL.ImageDraw.Draw.textsize(text, font=None, spacing=4, direction=None,
features=None)
Return the size of the given string, in pixels.
@ -276,11 +301,51 @@ Methods
:param font: An :py:class:`~PIL.ImageFont.ImageFont` instance.
:param spacing: If the text is passed on to multiline_textsize(),
the number of pixels between lines.
:param direction: Direction of the text. It can be 'rtl' (right to
left), 'ltr' (left to right), 'ttb' (top to
bottom) or 'btt' (bottom to top). Requires
libraqm.
.. py:method:: PIL.ImageDraw.Draw.multiline_textsize(text, font=None, spacing=0)
.. versionadded:: 4.2.0
:param features: A list of OpenType font features 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
Requires libraqm.
.. versionadded:: 4.2.0
.. py:method:: PIL.ImageDraw.Draw.multiline_textsize(text, font=None, spacing=4, direction=None,
features=None)
Return the size of the given string, in pixels.
:param text: Text to be measured.
:param font: An :py:class:`~PIL.ImageFont.ImageFont` instance.
:param spacing: The number of pixels between lines.
:param direction: Direction of the text. It can be 'rtl' (right to
left), 'ltr' (left to right), 'ttb' (top to
bottom) or 'btt' (bottom to top). Requires
libraqm.
.. versionadded:: 4.2.0
:param features: A list of OpenType font features 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
Requires libraqm.
.. versionadded:: 4.2.0

View File

@ -63,14 +63,28 @@ Methods
driver prefers; if empty, the renderer may return either
mode. Note that the mode is always a string, to simplify
C-level implementations.
:param direction: Direction of the text. It can be 'rtl', 'ltr', 'ttb' or 'btt'. Requires libraqm
: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
Requires libraqm
.. versionadded:: 1.1.5
:param direction: Direction of the text. It can be 'rtl' (right to
left), 'ltr' (left to right), 'ttb' (top to
bottom) or 'btt' (bottom to top). Requires
libraqm.
.. versionadded:: 4.2.0
:param features: A list of OpenType font features 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
Requires libraqm.
.. versionadded:: 4.2.0
:return: An internal PIL storage memory instance as defined by the
:py:mod:`PIL.Image.core` interface module.