@@ -310,10 +310,24 @@ static PyObject *PyFT2Font_new(PyTypeObject *type, PyObject *args, PyObject *kwd
310310}
311311
312312const char *PyFT2Font_init__doc__ =
313- " FT2Font(ttffile )\n "
313+ " FT2Font(filename, hinting_factor=8, *, _fallback_list=None, _kerning_factor=0 )\n "
314314 " --\n\n "
315315 " Create a new FT2Font object.\n "
316316 " \n "
317+ " Parameters\n "
318+ " ----------\n "
319+ " filename : str or file-like\n "
320+ " The source of the font data in a format (ttf or ttc) that FreeType can read\n\n "
321+ " hinting_factor : int, optional\n "
322+ " Must be positive. Used to scale the hinting in the x-direction\n "
323+ " _fallback_list : list of FT2Font, optional\n "
324+ " A list of FT2Font objects used to find missing glyphs.\n\n "
325+ " .. warning ::\n "
326+ " This API is both private and provisional: do not use it directly\n\n "
327+ " _kerning_factor : int, optional\n "
328+ " Used to adjust the degree of kerning.\n\n "
329+ " .. warning ::\n "
330+ " This API is private: do not use it directly\n\n "
317331 " Attributes\n "
318332 " ----------\n "
319333 " num_faces\n "
@@ -518,10 +532,10 @@ const char *PyFT2Font_get_kerning__doc__ =
518532 " get_kerning(self, left, right, mode)\n "
519533 " --\n\n "
520534 " Get the kerning between *left* and *right* glyph indices.\n "
521- " *mode* is a kerning mode constant:\n "
522- " KERNING_DEFAULT - Return scaled and grid-fitted kerning distances\n "
523- " KERNING_UNFITTED - Return scaled but un-grid-fitted kerning distances\n "
524- " KERNING_UNSCALED - Return the kerning vector in original font units\n " ;
535+ " *mode* is a kerning mode constant:\n\n "
536+ " - KERNING_DEFAULT - Return scaled and grid-fitted kerning distances\n "
537+ " - KERNING_UNFITTED - Return scaled but un-grid-fitted kerning distances\n "
538+ " - KERNING_UNSCALED - Return the kerning vector in original font units\n " ;
525539
526540static PyObject *PyFT2Font_get_kerning (PyFT2Font *self, PyObject *args)
527541{
@@ -626,16 +640,16 @@ const char *PyFT2Font_load_char__doc__ =
626640 " Load character with *charcode* in current fontfile and set glyph.\n "
627641 " *flags* can be a bitwise-or of the LOAD_XXX constants;\n "
628642 " the default value is LOAD_FORCE_AUTOHINT.\n "
629- " Return value is a Glyph object, with attributes\n "
630- " width # glyph width\n "
631- " height # glyph height\n "
632- " bbox # the glyph bbox (xmin, ymin, xmax, ymax)\n "
633- " horiBearingX # left side bearing in horizontal layouts\n "
634- " horiBearingY # top side bearing in horizontal layouts\n "
635- " horiAdvance # advance width for horizontal layout\n "
636- " vertBearingX # left side bearing in vertical layouts\n "
637- " vertBearingY # top side bearing in vertical layouts\n "
638- " vertAdvance # advance height for vertical layout\n " ;
643+ " Return value is a Glyph object, with attributes\n\n "
644+ " - width # glyph width\n "
645+ " - height # glyph height\n "
646+ " - bbox # the glyph bbox (xmin, ymin, xmax, ymax)\n "
647+ " - horiBearingX # left side bearing in horizontal layouts\n "
648+ " - horiBearingY # top side bearing in horizontal layouts\n "
649+ " - horiAdvance # advance width for horizontal layout\n "
650+ " - vertBearingX # left side bearing in vertical layouts\n "
651+ " - vertBearingY # top side bearing in vertical layouts\n "
652+ " - vertAdvance # advance height for vertical layout\n " ;
639653
640654static PyObject *PyFT2Font_load_char (PyFT2Font *self, PyObject *args, PyObject *kwds)
641655{
@@ -664,16 +678,16 @@ const char *PyFT2Font_load_glyph__doc__ =
664678 " Load character with *glyphindex* in current fontfile and set glyph.\n "
665679 " *flags* can be a bitwise-or of the LOAD_XXX constants;\n "
666680 " the default value is LOAD_FORCE_AUTOHINT.\n "
667- " Return value is a Glyph object, with attributes\n "
668- " width # glyph width\n "
669- " height # glyph height\n "
670- " bbox # the glyph bbox (xmin, ymin, xmax, ymax)\n "
671- " horiBearingX # left side bearing in horizontal layouts\n "
672- " horiBearingY # top side bearing in horizontal layouts\n "
673- " horiAdvance # advance width for horizontal layout\n "
674- " vertBearingX # left side bearing in vertical layouts\n "
675- " vertBearingY # top side bearing in vertical layouts\n "
676- " vertAdvance # advance height for vertical layout\n " ;
681+ " Return value is a Glyph object, with attributes\n\n "
682+ " - width # glyph width\n "
683+ " - height # glyph height\n "
684+ " - bbox # the glyph bbox (xmin, ymin, xmax, ymax)\n "
685+ " - horiBearingX # left side bearing in horizontal layouts\n "
686+ " - horiBearingY # top side bearing in horizontal layouts\n "
687+ " - horiAdvance # advance width for horizontal layout\n "
688+ " - vertBearingX # left side bearing in vertical layouts\n "
689+ " - vertBearingY # top side bearing in vertical layouts\n "
690+ " - vertAdvance # advance height for vertical layout\n " ;
677691
678692static PyObject *PyFT2Font_load_glyph (PyFT2Font *self, PyObject *args, PyObject *kwds)
679693{
0 commit comments