Updated indentation

This commit is contained in:
Andrew Murray 2022-07-01 19:45:36 +10:00
parent 74e0b954f2
commit 729fe6f8b0
2 changed files with 18 additions and 11 deletions

View File

@ -437,9 +437,10 @@ Methods
.. py:method:: ImageDraw.textsize(text, font=None, spacing=4, direction=None, features=None, language=None, stroke_width=0) .. py:method:: ImageDraw.textsize(text, font=None, spacing=4, direction=None, features=None, language=None, stroke_width=0)
.. deprecated:: 9.2.0 .. deprecated:: 9.2.0
Use :py:meth:`textlength()` to measure the offset of following text with
1/64 pixel precision. Use :py:meth:`textlength()` to measure the offset of following text with
Use :py:meth:`textbbox()` to get the exact bounding box based on an anchor. 1/64 pixel precision.
Use :py:meth:`textbbox()` to get the exact bounding box based on an anchor.
Return the size of the given string, in pixels. Return the size of the given string, in pixels.
@ -486,7 +487,8 @@ Methods
.. py:method:: ImageDraw.multiline_textsize(text, font=None, spacing=4, direction=None, features=None, language=None, stroke_width=0) .. py:method:: ImageDraw.multiline_textsize(text, font=None, spacing=4, direction=None, features=None, language=None, stroke_width=0)
.. deprecated:: 9.2.0 .. deprecated:: 9.2.0
Use :py:meth:`.multiline_textbbox` instead.
Use :py:meth:`.multiline_textbbox` instead.
Return the size of the given string, in pixels. Return the size of the given string, in pixels.

View File

@ -138,7 +138,8 @@ class ImageFont:
def getsize(self, text, *args, **kwargs): def getsize(self, text, *args, **kwargs):
""" """
.. deprecated:: 9.2.0 .. deprecated:: 9.2.0
Use :py:meth:`.getbbox` or :py:meth:`.getlength` instead.
Use :py:meth:`.getbbox` or :py:meth:`.getlength` instead.
Returns width and height (in pixels) of given text. Returns width and height (in pixels) of given text.
@ -428,9 +429,10 @@ class FreeTypeFont:
): ):
""" """
.. deprecated:: 9.2.0 .. deprecated:: 9.2.0
Use :py:meth:`getlength()` to measure the offset of following text with
1/64 pixel precision. Use :py:meth:`getlength()` to measure the offset of following text with
Use :py:meth:`getbbox()` to get the exact bounding box based on an anchor. 1/64 pixel precision.
Use :py:meth:`getbbox()` to get the exact bounding box based on an anchor.
Returns width and height (in pixels) of given text if rendered in font with Returns width and height (in pixels) of given text if rendered in font with
provided direction, features, and language. provided direction, features, and language.
@ -498,7 +500,8 @@ class FreeTypeFont:
): ):
""" """
.. deprecated:: 9.2.0 .. deprecated:: 9.2.0
Use :py:meth:`.ImageDraw.multiline_textbbox` instead.
Use :py:meth:`.ImageDraw.multiline_textbbox` instead.
Returns width and height (in pixels) of given text if rendered in font Returns width and height (in pixels) of given text if rendered in font
with provided direction, features, and language, while respecting with provided direction, features, and language, while respecting
@ -556,7 +559,8 @@ class FreeTypeFont:
def getoffset(self, text): def getoffset(self, text):
""" """
.. deprecated:: 9.2.0 .. deprecated:: 9.2.0
Use :py:meth:`.getbbox` instead.
Use :py:meth:`.getbbox` instead.
Returns the offset of given text. This is the gap between the Returns the offset of given text. This is the gap between the
starting coordinate and the first marking. Note that this gap is starting coordinate and the first marking. Note that this gap is
@ -849,7 +853,8 @@ class TransposedFont:
def getsize(self, text, *args, **kwargs): def getsize(self, text, *args, **kwargs):
""" """
.. deprecated:: 9.2.0 .. deprecated:: 9.2.0
Use :py:meth:`.getbbox` or :py:meth:`.getlength` instead.
Use :py:meth:`.getbbox` or :py:meth:`.getlength` instead.
""" """
if not kwargs.get("__internal__"): if not kwargs.get("__internal__"):
deprecate("getsize", 10, "getbbox or getlength") deprecate("getsize", 10, "getbbox or getlength")