Merge pull request #6633 from radarhere/raqm

This commit is contained in:
Hugo van Kemenade 2022-10-10 09:16:10 +02:00 committed by GitHub
commit 91e820fb46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -955,6 +955,11 @@ def truetype(font=None, size=10, index=0, encoding="", layout_engine=None):
encoding of any text provided in subsequent operations. encoding of any text provided in subsequent operations.
:param layout_engine: Which layout engine to use, if available: :param layout_engine: Which layout engine to use, if available:
:data:`.ImageFont.Layout.BASIC` or :data:`.ImageFont.Layout.RAQM`. :data:`.ImageFont.Layout.BASIC` or :data:`.ImageFont.Layout.RAQM`.
If it is available, Raqm layout will be used by default.
Otherwise, basic layout will be used.
Raqm layout is recommended for all non-English text. If Raqm layout
is not required, basic layout will have better performance.
You can check support for Raqm layout using You can check support for Raqm layout using
:py:func:`PIL.features.check_feature` with ``feature="raqm"``. :py:func:`PIL.features.check_feature` with ``feature="raqm"``.