mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 18:06:18 +03:00
Merge pull request #7305 from hugovk/docs-clarify-textlength-return
Docs: Clarify that a single value is returned, and depends on the text direction
This commit is contained in:
commit
07623d1a7c
|
@ -538,7 +538,7 @@ Methods
|
|||
It should be a `BCP 47 language code`_.
|
||||
Requires libraqm.
|
||||
:param embedded_color: Whether to use font embedded color glyphs (COLR, CBDT, SBIX).
|
||||
:return: Width for horizontal, height for vertical text.
|
||||
:return: Either width for horizontal text, or height for vertical text.
|
||||
|
||||
.. py:method:: ImageDraw.textbbox(xy, text, font=None, anchor=None, spacing=4, align="left", direction=None, features=None, language=None, stroke_width=0, embedded_color=False)
|
||||
|
||||
|
|
|
@ -318,7 +318,7 @@ class FreeTypeFont:
|
|||
<https://www.w3.org/International/articles/language-tags/>`_
|
||||
Requires libraqm.
|
||||
|
||||
:return: Width for horizontal, height for vertical text.
|
||||
:return: Either width for horizontal text, or height for vertical text.
|
||||
"""
|
||||
_string_length_check(text)
|
||||
return self.font.getlength(text, mode, direction, features, language) / 64
|
||||
|
|
Loading…
Reference in New Issue
Block a user