@@ -1605,8 +1605,8 @@ PYBIND11_MODULE(ft2font, m, py::mod_gil_not_used())
16051605 .def_property_readonly (" bbox" , &PyGlyph_get_bbox,
16061606 " The control box of the glyph." );
16071607
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__)
16101610 .def (py::init (&PyFT2Font_init),
16111611 " filename" _a, " hinting_factor" _a=8 , py::kw_only (),
16121612 " _fallback_list" _a=py::none (), " _kerning_factor" _a=0 ,
@@ -1640,20 +1640,10 @@ PYBIND11_MODULE(ft2font, m, py::mod_gil_not_used())
16401640 .def (" get_descent" , &PyFT2Font_get_descent, PyFT2Font_get_descent__doc__)
16411641 .def (" draw_glyphs_to_bitmap" , &PyFT2Font_draw_glyphs_to_bitmap,
16421642 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__)
16571647 .def (" get_glyph_name" , &PyFT2Font_get_glyph_name, " index" _a,
16581648 PyFT2Font_get_glyph_name__doc__)
16591649 .def (" get_charmap" , &PyFT2Font_get_charmap, PyFT2Font_get_charmap__doc__)
0 commit comments