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
Copy file name to clipboardExpand all lines: stubs/matplotlib/ft2font.pyi
+32-32Lines changed: 32 additions & 32 deletions
Original file line number
Diff line number
Diff line change
@@ -11,37 +11,37 @@ FIXED_SIZES: int
11
11
FIXED_WIDTH: int
12
12
13
13
classFT2Font(_mod_builtins.object):
14
-
"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"
14
+
15
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"
16
+
17
17
...
18
18
19
19
@classmethod
20
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"
26
+
27
27
...
28
28
29
29
@property
30
30
defascender(self) ->typing.Any: ...
31
31
@property
32
32
defbbox(self) ->typing.Any: ...
33
33
defclear(self) ->typing.Any:
34
-
"Clear all the glyphs, reset for a new call to `.set_text`.\n"
34
+
35
35
...
36
36
37
37
@property
38
38
defdescender(self) ->typing.Any: ...
39
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"
40
+
41
41
...
42
42
43
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"
44
+
45
45
...
46
46
47
47
@property
@@ -51,73 +51,73 @@ class FT2Font(_mod_builtins.object):
51
51
@property
52
52
deffname(self) ->typing.Any: ...
53
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"
54
+
55
55
...
56
56
57
57
defget_char_index(self, codepoint) ->typing.Any:
58
-
"Return the glyph index corresponding to a character *codepoint*.\n"
58
+
59
59
...
60
60
61
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"
62
+
63
63
...
64
64
65
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"
66
+
67
67
...
68
68
69
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"
70
+
71
71
...
72
72
73
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"
78
+
79
79
...
80
80
81
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"
82
+
83
83
...
84
84
85
85
defget_num_glyphs(self) ->typing.Any:
86
-
"Return the number of loaded glyphs.\n"
86
+
87
87
...
88
88
89
89
defget_path(self) ->typing.Any:
90
-
"Get the path data from the currently loaded glyph as a tuple of vertices, codes.\n"
90
+
91
91
...
92
92
93
93
defget_ps_font_info(self) ->typing.Any:
94
-
"Return the information in the PS Font Info structure.\n"
94
+
95
95
...
96
96
97
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"
98
+
99
99
...
100
100
101
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"
102
+
103
103
...
104
104
105
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"
106
+
107
107
...
108
108
109
109
defget_xys(self) ->typing.Any:
110
-
"Get the xy locations of the current glyphs.\n"
110
+
111
111
...
112
112
113
113
@property
114
114
defheight(self) ->typing.Any: ...
115
115
defload_char(self, charcode, flags) ->typing.Any:
116
-
"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"
120
+
121
121
...
122
122
123
123
@property
@@ -137,19 +137,19 @@ class FT2Font(_mod_builtins.object):
"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"
152
+
153
153
...
154
154
155
155
@property
@@ -168,20 +168,20 @@ class FT2Image(_mod_builtins.object):
168
168
def__init__(self, *args, **kwargs) ->None: ...
169
169
@classmethod
170
170
def__init_subclass__(cls) ->None:
171
-
"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"
0 commit comments