@@ -23,6 +23,8 @@ const char *Kerning__doc__ = R"""(
23
23
24
24
For more information, see `the FreeType documentation
25
25
<https://freetype.org/freetype2/docs/reference/ft2-glyph_retrieval.html#ft_kerning_mode>`_.
26
+
27
+ .. versionadded:: 3.10
26
28
)""" ;
27
29
28
30
P11X_DECLARE_ENUM (
@@ -37,6 +39,8 @@ const char *FaceFlags__doc__ = R"""(
37
39
38
40
For more information, see `the FreeType documentation
39
41
<https://freetype.org/freetype2/docs/reference/ft2-face_creation.html#ft_face_flag_xxx>`_.
42
+
43
+ .. versionadded:: 3.10
40
44
)""" ;
41
45
42
46
enum class FaceFlags : FT_Long {
@@ -102,10 +106,12 @@ P11X_DECLARE_ENUM("FaceFlags", "enum.Flag",
102
106
);
103
107
104
108
const char *LoadFlags__doc__ = R"""(
105
- Flags for `FT2Font.load_char`, `FT2font .load_glyph`, and `FT2Font.set_text`.
109
+ Flags for `FT2Font.load_char`, `FT2Font .load_glyph`, and `FT2Font.set_text`.
106
110
107
111
For more information, see `the FreeType documentation
108
112
<https://freetype.org/freetype2/docs/reference/ft2-glyph_retrieval.html#ft_load_xxx>`_.
113
+
114
+ .. versionadded:: 3.10
109
115
)""" ;
110
116
111
117
enum class LoadFlags : FT_Int32 {
@@ -184,6 +190,8 @@ const char *StyleFlags__doc__ = R"""(
184
190
185
191
For more information, see `the FreeType documentation
186
192
<https://freetype.org/freetype2/docs/reference/ft2-face_creation.html#ft_style_flag_xxx>`_.
193
+
194
+ .. versionadded:: 3.10
187
195
)""" ;
188
196
189
197
enum class StyleFlags : FT_Long {
@@ -551,6 +559,9 @@ const char *PyFT2Font_get_kerning__doc__ = R"""(
551
559
- ``UNFITTED`` - Return scaled but un-grid-fitted kerning distances.
552
560
- ``UNSCALED`` - Return the kerning vector in original font units.
553
561
562
+ .. versionchanged:: 3.10
563
+ This now takes a `.ft2font.Kerning` value instead of an `int`.
564
+
554
565
Returns
555
566
-------
556
567
int
@@ -637,7 +648,10 @@ const char *PyFT2Font_set_text__doc__ = R"""(
637
648
angle : float
638
649
The angle at which to render the supplied text.
639
650
flags : LoadFlags, default: `.LoadFlags.FORCE_AUTOHINT`
640
- Any bitwise-OR combination of the `.LoadFlags` enum.
651
+ Any bitwise-OR combination of the `.LoadFlags` flags.
652
+
653
+ .. versionchanged:: 3.10
654
+ This now takes an `.ft2font.LoadFlags` instead of an int.
641
655
642
656
Returns
643
657
-------
@@ -689,7 +703,10 @@ const char *PyFT2Font_load_char__doc__ = R"""(
689
703
The character code to prepare rendering information for. This code must be in
690
704
the charmap, or else a ``.notdef`` glyph may be returned instead.
691
705
flags : LoadFlags, default: `.LoadFlags.FORCE_AUTOHINT`
692
- Any bitwise-OR combination of the `.LoadFlags` enum.
706
+ Any bitwise-OR combination of the `.LoadFlags` flags.
707
+
708
+ .. versionchanged:: 3.10
709
+ This now takes an `.ft2font.LoadFlags` instead of an int.
693
710
694
711
Returns
695
712
-------
@@ -737,7 +754,10 @@ const char *PyFT2Font_load_glyph__doc__ = R"""(
737
754
glyph_index : int
738
755
The glyph index to prepare rendering information for.
739
756
flags : LoadFlags, default: `.LoadFlags.FORCE_AUTOHINT`
740
- Any bitwise-OR combination of the `.LoadFlags` enum.
757
+ Any bitwise-OR combination of the `.LoadFlags` flags.
758
+
759
+ .. versionchanged:: 3.10
760
+ This now takes an `.ft2font.LoadFlags` instead of an int.
741
761
742
762
Returns
743
763
-------
@@ -1590,6 +1610,10 @@ PYBIND11_MODULE(ft2font, m)
1590
1610
snprintf (version_string, sizeof (version_string), " %d.%d.%d" , major, minor, patch);
1591
1611
1592
1612
p11x::bind_enums (m);
1613
+ p11x::enums[" Kerning" ].attr (" __doc__" ) = Kerning__doc__;
1614
+ p11x::enums[" LoadFlags" ].attr (" __doc__" ) = LoadFlags__doc__;
1615
+ p11x::enums[" FaceFlags" ].attr (" __doc__" ) = FaceFlags__doc__;
1616
+ p11x::enums[" StyleFlags" ].attr (" __doc__" ) = StyleFlags__doc__;
1593
1617
1594
1618
py::class_<FT2Image>(m, " FT2Image" , py::is_final (), py::buffer_protocol (),
1595
1619
PyFT2Image__doc__)
0 commit comments