mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-03-03 19:45:56 +03:00
Doc changes/additions
This commit is contained in:
parent
90a9913705
commit
9f7aae3505
|
@ -240,16 +240,28 @@ 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'. Requires libraqm
|
:param direction: Direction of the text. It can be 'rtl' (right to
|
||||||
:param features: A list of font feature to be used during text layout.
|
left), 'ltr' (left to right), 'ttb' (top to
|
||||||
This is usually used to turn on optional font features that are not enabled by
|
bottom) or 'btt' (bottom to top). Requires
|
||||||
default, for example 'dlig' or 'ss01', but can be also used to turn off default
|
libraqm.
|
||||||
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:: 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.
|
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",
|
.. 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.
|
Draws the string at the given position.
|
||||||
|
|
||||||
|
@ -259,15 +271,28 @@ 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. It can be 'rtl', 'ltr', 'ttb' or 'btt'. Requires libraqm.
|
:param direction: Direction of the text. It can be 'rtl' (right to
|
||||||
:param features: A list of font feature to be used during text layout.
|
left), 'ltr' (left to right), 'ttb' (top to
|
||||||
This is usually used to turn on optional font features that are not enabled by
|
bottom) or 'btt' (bottom to top). Requires
|
||||||
default, for example 'dlig' or 'ss01', but can be also used to turn off default
|
libraqm.
|
||||||
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:: 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.
|
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.
|
Return the size of the given string, in pixels.
|
||||||
|
|
||||||
|
@ -276,11 +301,51 @@ Methods
|
||||||
:param font: An :py:class:`~PIL.ImageFont.ImageFont` instance.
|
:param font: An :py:class:`~PIL.ImageFont.ImageFont` instance.
|
||||||
:param spacing: If the text is passed on to multiline_textsize(),
|
:param spacing: If the text is passed on to multiline_textsize(),
|
||||||
the number of pixels between lines.
|
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.
|
Return the size of the given string, in pixels.
|
||||||
|
|
||||||
:param text: Text to be measured.
|
:param text: Text to be measured.
|
||||||
: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 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
|
||||||
|
|
|
@ -63,14 +63,28 @@ 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. 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
|
.. 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
|
:return: An internal PIL storage memory instance as defined by the
|
||||||
:py:mod:`PIL.Image.core` interface module.
|
:py:mod:`PIL.Image.core` interface module.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user