@@ -1605,8 +1605,8 @@ PYBIND11_MODULE(ft2font, m, py::mod_gil_not_used())
1605
1605
.def_property_readonly (" bbox" , &PyGlyph_get_bbox,
1606
1606
" The control box of the glyph." );
1607
1607
1608
- auto cls = py::class_<PyFT2Font>(m, " FT2Font" , py::is_final (), py::buffer_protocol (),
1609
- PyFT2Font__doc__)
1608
+ py::class_<PyFT2Font>(m, " FT2Font" , py::is_final (), py::buffer_protocol (),
1609
+ PyFT2Font__doc__)
1610
1610
.def (py::init (&PyFT2Font_init),
1611
1611
" filename" _a, " hinting_factor" _a=8 , py::kw_only (),
1612
1612
" _fallback_list" _a=py::none (), " _kerning_factor" _a=0 ,
@@ -1640,20 +1640,10 @@ PYBIND11_MODULE(ft2font, m, py::mod_gil_not_used())
1640
1640
.def (" get_descent" , &PyFT2Font_get_descent, PyFT2Font_get_descent__doc__)
1641
1641
.def (" draw_glyphs_to_bitmap" , &PyFT2Font_draw_glyphs_to_bitmap,
1642
1642
py::kw_only (), " antialiased" _a=true ,
1643
- PyFT2Font_draw_glyphs_to_bitmap__doc__);
1644
- // The generated docstring uses an unqualified "Buffer" as type hint,
1645
- // which causes an error in sphinx. This is fixed as of pybind11
1646
- // master (since #5566) which now uses "collections.abc.Buffer";
1647
- // restore the signature once that version is released.
1648
- {
1649
- py::options options{};
1650
- options.disable_function_signatures ();
1651
- cls
1652
- .def (" draw_glyph_to_bitmap" , &PyFT2Font_draw_glyph_to_bitmap,
1653
- " image" _a, " x" _a, " y" _a, " glyph" _a, py::kw_only (), " antialiased" _a=true ,
1654
- PyFT2Font_draw_glyph_to_bitmap__doc__);
1655
- }
1656
- cls
1643
+ PyFT2Font_draw_glyphs_to_bitmap__doc__)
1644
+ .def (" draw_glyph_to_bitmap" , &PyFT2Font_draw_glyph_to_bitmap,
1645
+ " image" _a, " x" _a, " y" _a, " glyph" _a, py::kw_only (), " antialiased" _a=true ,
1646
+ PyFT2Font_draw_glyph_to_bitmap__doc__)
1657
1647
.def (" get_glyph_name" , &PyFT2Font_get_glyph_name, " index" _a,
1658
1648
PyFT2Font_get_glyph_name__doc__)
1659
1649
.def (" get_charmap" , &PyFT2Font_get_charmap, PyFT2Font_get_charmap__doc__)
0 commit comments