Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle pathlib.Path in FreeTypeFont #7578

Merged
merged 8 commits into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions docs/reference/ImageFont.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,21 +70,20 @@ Methods
Constants
---------

.. data:: PIL.ImageFont.Layout.BASIC
.. class:: Layout

Use basic text layout for TrueType font.
Advanced features such as text direction are not supported.
.. py:attribute:: BASIC

.. data:: PIL.ImageFont.Layout.RAQM
Use basic text layout for TrueType font.
Advanced features such as text direction are not supported.

Use Raqm text layout for TrueType font.
Advanced features are supported.
.. py:attribute:: RAQM

Requires Raqm, you can check support using
:py:func:`PIL.features.check_feature` with ``feature="raqm"``.
Use Raqm text layout for TrueType font.
Advanced features are supported.

Constants
---------
Requires Raqm, you can check support using
:py:func:`PIL.features.check_feature` with ``feature="raqm"``.

.. data:: MAX_STRING_LENGTH

Expand Down
2 changes: 1 addition & 1 deletion src/PIL/ImageFont.py
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,7 @@ def truetype(font=None, size=10, index=0, encoding="", layout_engine=None):
This specifies the character set to use. It does not alter the
encoding of any text provided in subsequent operations.
:param layout_engine: Which layout engine to use, if available:
:data:`.ImageFont.Layout.BASIC` or :data:`.ImageFont.Layout.RAQM`.
:attr:`.ImageFont.Layout.BASIC` or :attr:`.ImageFont.Layout.RAQM`.
If it is available, Raqm layout will be used by default.
Otherwise, basic layout will be used.

Expand Down