You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"Create a new FT2Font object.\n\nAttributes\n----------\nnum_faces\n Number of faces in file.\nface_flags, style_flags : int\n Face and style flags; see the ft2font constants.\nnum_glyphs\n Number of glyphs in the face.\nfamily_name, style_name\n Face family and style name.\nnum_fixed_sizes\n Number of bitmap in the face.\nscalable\n Whether face is scalable; attributes after this one are only\n defined for scalable faces.\nbbox\n Face global bounding box (xmin, ymin, xmax, ymax).\nunits_per_EM\n Number of font units covered by the EM.\nascender, descender\n Ascender and descender in 26.6 units.\nheight\n Height in 26.6 units; used to compute a default line spacing\n (baseline-to-baseline distance).\nmax_advance_width, max_advance_height\n Maximum horizontal and vertical cursor advance for all glyphs.\nunderline_position, underline_thickness\n Vertical position and thickness of the underline bar.\npostscript_name\n PostScript name of the font.\n"
15
-
def__init__(self, *args, **kwargs) ->None:
16
-
"Create a new FT2Font object.\n\nAttributes\n----------\nnum_faces\n Number of faces in file.\nface_flags, style_flags : int\n Face and style flags; see the ft2font constants.\nnum_glyphs\n Number of glyphs in the face.\nfamily_name, style_name\n Face family and style name.\nnum_fixed_sizes\n Number of bitmap in the face.\nscalable\n Whether face is scalable; attributes after this one are only\n defined for scalable faces.\nbbox\n Face global bounding box (xmin, ymin, xmax, ymax).\nunits_per_EM\n Number of font units covered by the EM.\nascender, descender\n Ascender and descender in 26.6 units.\nheight\n Height in 26.6 units; used to compute a default line spacing\n (baseline-to-baseline distance).\nmax_advance_width, max_advance_height\n Maximum horizontal and vertical cursor advance for all glyphs.\nunderline_position, underline_thickness\n Vertical position and thickness of the underline bar.\npostscript_name\n PostScript name of the font.\n"
17
-
...
18
-
14
+
def__init__(self, *args, **kwargs) ->None: ...
19
15
@classmethod
20
-
def__init_subclass__(cls) ->None:
21
-
"This method is called when a class is subclassed.\n\nThe default implementation does nothing. It may be\noverridden to extend subclasses.\n"
"Abstract classes can override this to customize issubclass().\n\nThis is invoked early on by abc.ABCMeta.__subclasscheck__().\nIt should return True, False or NotImplemented. If it returns\nNotImplemented, the normal algorithm is used. Otherwise, it\noverrides the normal algorithm (and the outcome is cached).\n"
"Clear all the glyphs, reset for a new call to `.set_text`.\n"
35
-
...
36
-
23
+
defclear(self) ->typing.Any: ...
37
24
@property
38
25
defdescender(self) ->typing.Any: ...
39
-
defdraw_glyph_to_bitmap(self, bitmap, x, y, glyph) ->typing.Any:
40
-
"Draw a single glyph to the bitmap at pixel locations x, y\nNote it is your responsibility to set up the bitmap manually\nwith ``set_bitmap_size(w, h)`` before this call is made.\n\nIf you want automatic layout, use `.set_text` in combinations with\n`.draw_glyphs_to_bitmap`. This function is instead intended for people\nwho want to render individual glyphs (e.g., returned by `.load_char`)\nat precise locations.\n"
41
-
...
42
-
43
-
defdraw_glyphs_to_bitmap(self) ->typing.Any:
44
-
"Draw the glyphs that were loaded by `.set_text` to the bitmap.\nThe bitmap size will be automatically set to include the glyphs.\n"
45
-
...
46
-
26
+
defdraw_glyph_to_bitmap(self, bitmap, x, y, glyph) ->typing.Any: ...
27
+
defdraw_glyphs_to_bitmap(self) ->typing.Any: ...
47
28
@property
48
29
defface_flags(self) ->typing.Any: ...
49
30
@property
50
31
deffamily_name(self) ->typing.Any: ...
51
32
@property
52
33
deffname(self) ->typing.Any: ...
53
-
defget_bitmap_offset(self) ->typing.Any:
54
-
"Get the (x, y) offset in 26.6 subpixels for the bitmap if ink hangs left or below (0, 0).\nSince Matplotlib only supports left-to-right text, y is always 0.\n"
55
-
...
56
-
57
-
defget_char_index(self, codepoint) ->typing.Any:
58
-
"Return the glyph index corresponding to a character *codepoint*.\n"
59
-
...
60
-
61
-
defget_charmap(self) ->typing.Any:
62
-
"Return a dict that maps the character codes of the selected charmap\n(Unicode by default) to their corresponding glyph indices.\n"
63
-
...
64
-
65
-
defget_descent(self) ->typing.Any:
66
-
"Get the descent in 26.6 subpixels of the current string set by `.set_text`.\nThe rotation of the string is accounted for. To get the descent\nin pixels, divide this value by 64.\n"
67
-
...
68
-
69
-
defget_glyph_name(self, index) ->typing.Any:
70
-
"Retrieve the ASCII name of a given glyph *index* in a face.\n\nDue to Matplotlib's internal design, for fonts that do not contain glyph\nnames (per FT_FACE_FLAG_GLYPH_NAMES), this returns a made-up name which\ndoes *not* roundtrip through `.get_name_index`.\n"
71
-
...
72
-
73
-
defget_image(self) ->typing.Any:
74
-
"Return the underlying image buffer for this font object.\n"
"Get the kerning between *left* and *right* glyph indices.\n*mode* is a kerning mode constant:\n KERNING_DEFAULT - Return scaled and grid-fitted kerning distances\n KERNING_UNFITTED - Return scaled but un-grid-fitted kerning distances\n KERNING_UNSCALED - Return the kerning vector in original font units\n"
79
-
...
80
-
81
-
defget_name_index(self, name) ->typing.Any:
82
-
"Return the glyph index of a given glyph *name*.\nThe glyph index 0 means 'undefined character code'.\n"
83
-
...
84
-
85
-
defget_num_glyphs(self) ->typing.Any:
86
-
"Return the number of loaded glyphs.\n"
87
-
...
88
-
89
-
defget_path(self) ->typing.Any:
90
-
"Get the path data from the currently loaded glyph as a tuple of vertices, codes.\n"
91
-
...
92
-
93
-
defget_ps_font_info(self) ->typing.Any:
94
-
"Return the information in the PS Font Info structure.\n"
95
-
...
96
-
97
-
defget_sfnt(self) ->typing.Any:
98
-
"Load the entire SFNT names table, as a dict whose keys are\n(platform-ID, ISO-encoding-scheme, language-code, and description)\ntuples.\n"
99
-
...
100
-
101
-
defget_sfnt_table(self, name) ->typing.Any:
102
-
"Return one of the following SFNT tables: head, maxp, OS/2, hhea, vhea, post, or pclt.\n"
103
-
...
104
-
105
-
defget_width_height(self) ->typing.Any:
106
-
"Get the width and height in 26.6 subpixels of the current string set by `.set_text`.\nThe rotation of the string is accounted for. To get width and height\nin pixels, divide these values by 64.\n"
"Load character with *charcode* in current fontfile and set glyph.\n*flags* can be a bitwise-or of the LOAD_XXX constants;\nthe default value is LOAD_FORCE_AUTOHINT.\nReturn value is a Glyph object, with attributes\n width # glyph width\n height # glyph height\n bbox # the glyph bbox (xmin, ymin, xmax, ymax)\n horiBearingX # left side bearing in horizontal layouts\n horiBearingY # top side bearing in horizontal layouts\n horiAdvance # advance width for horizontal layout\n vertBearingX # left side bearing in vertical layouts\n vertBearingY # top side bearing in vertical layouts\n vertAdvance # advance height for vertical layout\n"
"Load character with *glyphindex* in current fontfile and set glyph.\n*flags* can be a bitwise-or of the LOAD_XXX constants;\nthe default value is LOAD_FORCE_AUTOHINT.\nReturn value is a Glyph object, with attributes\n width # glyph width\n height # glyph height\n bbox # the glyph bbox (xmin, ymin, xmax, ymax)\n horiBearingX # left side bearing in horizontal layouts\n horiBearingY # top side bearing in horizontal layouts\n horiAdvance # advance width for horizontal layout\n vertBearingX # left side bearing in vertical layouts\n vertBearingY # top side bearing in vertical layouts\n vertAdvance # advance height for vertical layout\n"
"Set the text *string* and *angle*.\n*flags* can be a bitwise-or of the LOAD_XXX constants;\nthe default value is LOAD_FORCE_AUTOHINT.\nYou must call this before `.draw_glyphs_to_bitmap`.\nA sequence of x,y positions is returned.\n"
"Abstract classes can override this to customize issubclass().\n\nThis is invoked early on by abc.ABCMeta.__subclasscheck__().\nIt should return True, False or NotImplemented. If it returns\nNotImplemented, the normal algorithm is used. Otherwise, it\noverrides the normal algorithm (and the outcome is cached).\n"
0 commit comments