Skip to content

Commit

Permalink
Updated indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Jul 1, 2022
1 parent 74e0b95 commit 729fe6f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
10 changes: 6 additions & 4 deletions docs/reference/ImageDraw.rst
Original file line number Diff line number Diff line change
Expand Up @@ -437,9 +437,10 @@ Methods
.. py:method:: ImageDraw.textsize(text, font=None, spacing=4, direction=None, features=None, language=None, stroke_width=0)
.. deprecated:: 9.2.0
Use :py:meth:`textlength()` to measure the offset of following text with
1/64 pixel precision.
Use :py:meth:`textbbox()` to get the exact bounding box based on an anchor.

Use :py:meth:`textlength()` to measure the offset of following text with
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.

Expand Down Expand Up @@ -486,7 +487,8 @@ Methods
.. py:method:: ImageDraw.multiline_textsize(text, font=None, spacing=4, direction=None, features=None, language=None, stroke_width=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.

Expand Down
19 changes: 12 additions & 7 deletions src/PIL/ImageFont.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ def _load_pilfont_data(self, file, image):
def getsize(self, text, *args, **kwargs):
"""
.. 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.
Expand Down Expand Up @@ -428,9 +429,10 @@ def getsize(
):
"""
.. deprecated:: 9.2.0
Use :py:meth:`getlength()` to measure the offset of following text with
1/64 pixel precision.
Use :py:meth:`getbbox()` to get the exact bounding box based on an anchor.
Use :py:meth:`getlength()` to measure the offset of following text with
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
provided direction, features, and language.
Expand Down Expand Up @@ -498,7 +500,8 @@ def getsize_multiline(
):
"""
.. 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
with provided direction, features, and language, while respecting
Expand Down Expand Up @@ -556,7 +559,8 @@ def getsize_multiline(
def getoffset(self, text):
"""
.. 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
starting coordinate and the first marking. Note that this gap is
Expand Down Expand Up @@ -849,7 +853,8 @@ def __init__(self, font, orientation=None):
def getsize(self, text, *args, **kwargs):
"""
.. 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__"):
deprecate("getsize", 10, "getbbox or getlength")
Expand Down

0 comments on commit 729fe6f

Please sign in to comment.