mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-22 21:24:46 +03:00
fix lint and docs
This commit is contained in:
parent
97871205c2
commit
e0b53f0014
|
@ -1,5 +1,3 @@
|
|||
import distutils.version
|
||||
|
||||
import pytest
|
||||
from packaging.version import parse as parse_version
|
||||
from PIL import Image, ImageDraw, ImageFont, features
|
||||
|
|
|
@ -19,7 +19,7 @@ horizontal alignment, the second character is the vertical alignment.
|
|||
For example, the default value of ``la`` for horizontal text means left--ascender
|
||||
aligned text.
|
||||
|
||||
When drawing text with :py:meth:`PIL.ImageDraw.Draw.text` with a specific anchor,
|
||||
When drawing text with :py:meth:`PIL.ImageDraw.ImageDraw.text` with a specific anchor,
|
||||
text will be placed such that the specified anchor point is at the ``xy`` coordinates.
|
||||
|
||||
For example, in the following image, text is ``ms`` (middle--baseline) aligned, with ``xy`` at
|
||||
|
|
|
@ -392,7 +392,7 @@ Methods
|
|||
.. note:: For historical reasons this function measures text height from
|
||||
the ascender line instead of the top, see :ref:`text-anchors`.
|
||||
If you wish to measure text height from the top, it is recommended
|
||||
to use :meth:`.FreeTypeFont.getbbox` with `anchor='lt'` instead.
|
||||
to use :meth:`.FreeTypeFont.getbbox` with ``anchor='lt'`` instead.
|
||||
|
||||
|
||||
:param text: Text to be measured. If it contains any newline characters,
|
||||
|
|
|
@ -337,7 +337,7 @@ class FreeTypeFont:
|
|||
.. note:: For historical reasons this function measures text height from
|
||||
the ascender line instead of the top, see :ref:`text-anchors`.
|
||||
If you wish to measure text height from the top, it is recommended
|
||||
to use :meth:`getbbox` with `anchor='lt'` instead.
|
||||
to use :meth:`getbbox` with ``anchor='lt'`` instead.
|
||||
|
||||
:param text: Text to measure.
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user