Skip to content

Commit ea680d9

Browse files
authored
Merge pull request #21 from nulano/font
Fix documentation link to PIL.ImageFont.Layout
2 parents 13c1d75 + 984700b commit ea680d9

2 files changed

Lines changed: 10 additions & 11 deletions

File tree

docs/reference/ImageFont.rst

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -70,21 +70,20 @@ Methods
7070
Constants
7171
---------
7272

73-
.. data:: PIL.ImageFont.Layout.BASIC
73+
.. class:: Layout
7474

75-
Use basic text layout for TrueType font.
76-
Advanced features such as text direction are not supported.
75+
.. py:attribute:: BASIC
7776
78-
.. data:: PIL.ImageFont.Layout.RAQM
77+
Use basic text layout for TrueType font.
78+
Advanced features such as text direction are not supported.
7979

80-
Use Raqm text layout for TrueType font.
81-
Advanced features are supported.
80+
.. py:attribute:: RAQM
8281
83-
Requires Raqm, you can check support using
84-
:py:func:`PIL.features.check_feature` with ``feature="raqm"``.
82+
Use Raqm text layout for TrueType font.
83+
Advanced features are supported.
8584

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

8988
.. data:: MAX_STRING_LENGTH
9089

src/PIL/ImageFont.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,7 @@ def truetype(font=None, size=10, index=0, encoding="", layout_engine=None):
787787
This specifies the character set to use. It does not alter the
788788
encoding of any text provided in subsequent operations.
789789
:param layout_engine: Which layout engine to use, if available:
790-
:data:`.ImageFont.Layout.BASIC` or :data:`.ImageFont.Layout.RAQM`.
790+
:attr:`.ImageFont.Layout.BASIC` or :attr:`.ImageFont.Layout.RAQM`.
791791
If it is available, Raqm layout will be used by default.
792792
Otherwise, basic layout will be used.
793793

0 commit comments

Comments
 (0)