forked from microsoft/python-type-stubs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_mathtext.pyi
More file actions
250 lines (206 loc) · 8.04 KB
/
_mathtext.pyi
File metadata and controls
250 lines (206 loc) · 8.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
import enum
import functools
from sre_parse import State
from tkinter.tix import HList
from typing import Literal
from .font_manager import FontProperties
from .mathtext import MathtextBackend
def get_unicode_index(symbol: str, math: bool = True) -> int: ...
class Fonts:
def __init__(self, default_font_prop: FontProperties, mathtext_backend: MathtextBackend) -> None: ...
def get_kern(
self,
font1,
fontclass1,
sym1: str,
fontsize1: float,
font2,
fontclass2: float,
sym2: str,
fontsize2: float,
dpi: float,
) -> float: ...
def get_metrics(self, font: str, font_class: str, sym: str, fontsize: float, dpi: float) -> object: ...
def render_glyph(self, ox: float, oy: float, font, font_class, sym, fontsize: float, dpi: float) -> None: ...
def render_rect_filled(self, x1: float, y1: float, x2: float, y2: float) -> None: ...
def get_xheight(self, font, fontsize: float, dpi: float) -> float: ...
def get_underline_thickness(self, font, fontsize: float, dpi: float) -> float: ...
def get_used_characters(self): ...
def get_sized_alternatives_for_symbol(self, fontname, sym) -> list[tuple]: ...
class TruetypeFonts(Fonts):
def __init__(self, default_font_prop, mathtext_backend) -> None: ...
def get_xheight(self, fontname, fontsize: float, dpi: float) -> float: ...
def get_underline_thickness(self, font, fontsize: float, dpi: float) -> float: ...
def get_kern(
self,
font1,
fontclass1,
sym1: str,
fontsize1: float,
font2,
fontclass2: float,
sym2: str,
fontsize2: float,
dpi: float,
): ...
class BakomaFonts(TruetypeFonts):
def __init__(self, *args, **kwargs) -> None: ...
def get_sized_alternatives_for_symbol(self, fontname, sym) -> list[tuple]: ...
class UnicodeFonts(TruetypeFonts):
def __init__(self, *args, **kwargs) -> None: ...
def get_sized_alternatives_for_symbol(self, fontname, sym) -> list[tuple]: ...
class DejaVuFonts(UnicodeFonts):
def __init__(self, *args, **kwargs) -> None: ...
class DejaVuSerifFonts(DejaVuFonts): ...
class DejaVuSansFonts(DejaVuFonts): ...
class StixFonts(UnicodeFonts):
def __init__(self, *args, **kwargs) -> None: ...
@functools.lru_cache()
def get_sized_alternatives_for_symbol(self, fontname, sym) -> list[tuple]: ...
class StixSansFonts(StixFonts): ...
SHRINK_FACTOR: float = ...
NUM_SIZE_LEVELS: int = ...
class FontConstantsBase:
script_space: float = ...
subdrop: float = ...
sup1: float = ...
sub1: float = ...
sub2: float = ...
delta: float = ...
delta_slanted: float = ...
delta_integral: float = ...
class ComputerModernFontConstants(FontConstantsBase):
script_space: float = ...
subdrop: float = ...
sup1: float = ...
sub1: float = ...
sub2: float = ...
delta: float = ...
delta_slanted: float = ...
delta_integral: float = ...
class STIXFontConstants(FontConstantsBase):
script_space: float = ...
sup1: float = ...
sub2: float = ...
delta: float = ...
delta_slanted: float = ...
delta_integral: float = ...
class STIXSansFontConstants(FontConstantsBase):
script_space: float = ...
sup1: float = ...
delta_slanted: float = ...
delta_integral: float = ...
class DejaVuSerifFontConstants(FontConstantsBase): ...
class DejaVuSansFontConstants(FontConstantsBase): ...
class Node:
def __init__(self) -> None: ...
def get_kerning(self, next) -> float: ...
def shrink(self) -> None: ...
def render(self, x: float, y: float) -> None: ...
class Box(Node):
def __init__(self, width: float, height: float, depth: float) -> None: ...
def shrink(self) -> None: ...
def render(self, x1: float, y1: float, x2: float, y2: float) -> None: ...
class Vbox(Box):
def __init__(self, height: float, depth: float) -> None: ...
class Hbox(Box):
def __init__(self, width: float) -> None: ...
class Char(Node):
def __init__(self, c, state) -> None: ...
def is_slanted(self) -> bool: ...
def get_kerning(self, next) -> float: ...
def render(self, x: float, y: float) -> None: ...
def shrink(self) -> None: ...
class Accent(Char):
def shrink(self) -> None: ...
def render(self, x: float, y: float) -> None: ...
class List(Box):
def __init__(self, elements) -> None: ...
def shrink(self) -> None: ...
class Hlist(List):
def __init__(
self, elements, w: float = 0, m: Literal["exactly", "additional"] = "additional", do_kern: bool = True
) -> None: ...
def kern(self) -> None: ...
def hpack(self, w: float = 0, m: Literal["exactly", "additional"] = "additional") -> None: ...
class Vlist(List):
def __init__(self, elements, h=0, m=...) -> None: ...
def vpack(self, h: float = ..., m: Literal["exactly", "additional"] = "additional", l: float = ...) -> None: ...
class Rule(Box):
def __init__(self, width: float, height: float, depth: float, state) -> None: ...
def render(self, x: float, y: float, w: float, h: float) -> None: ...
class Hrule(Rule):
def __init__(self, state, thickness=...) -> None: ...
class Vrule(Rule):
def __init__(self, state) -> None: ...
class Glue(Node):
def __init__(self, glue_type) -> None: ...
def shrink(self): ...
class HCentered(Hlist):
def __init__(self, elements) -> None: ...
class VCentered(Vlist):
def __init__(self, elements) -> None: ...
class Kern(Node):
height: float = ...
depth: float = ...
def __init__(self, width: float) -> None: ...
def shrink(self) -> None: ...
class AutoHeightChar(Hlist):
def __init__(self, c, height: float, depth: float, state, always=False, factor=None) -> None: ...
class AutoWidthChar(Hlist):
def __init__(self, c, width: float, state, always=False, char_class=Char) -> None: ...
def ship(ox, oy, box) -> None: ...
def Error(msg): ...
class ParserState:
def __init__(self, font_output, font, font_class, fontsize: float, dpi: float) -> None: ...
def copy(self) -> ParserState: ...
@property
def font(self): ...
@font.setter
def font(self, name: str) -> None: ...
def get_current_underline_thickness(self) -> float: ...
def cmd(expr, args): ...
class Parser:
class _MathStyle(enum.Enum):
DISPLAYSTYLE = ...
TEXTSTYLE = ...
SCRIPTSTYLE = ...
SCRIPTSCRIPTSTYLE = ...
def __init__(self) -> None: ...
def parse(self, s, fonts_object, fontsize: float, dpi: float): ...
def get_state(self) -> ParserState: ...
def pop_state(self) -> ParserState: ...
def push_state(self): ...
def main(self, s, loc, toks) -> list[HList]: ...
def math_string(self, s, loc, toks): ...
def math(self, s, loc, toks) -> list[HList]: ...
def non_math(self, s, loc, toks) -> list[HList]: ...
float_literal = ...
def space(self, s, loc, toks) -> list[Kern]: ...
def customspace(self, s, loc, toks) -> list[Kern]: ...
def symbol(self, s, loc, toks) -> list: ...
accentprefixed = ...
def unknown_symbol(self, s, loc, toks): ...
def accent(self, s, loc, toks) -> Vlist: ...
def function(self, s, loc, toks) -> Hlist: ...
def operatorname(self, s, loc, toks) -> HList: ...
def start_group(self, s, loc, toks) -> list: ...
def group(self, s, loc, toks) -> list[Hlist]: ...
def required_group(self, s, loc, toks) -> Hlist: ...
optional_group = ...
def end_group(self, s, loc, toks) -> list: ...
def font(self, s, loc, toks) -> list: ...
def is_overunder(self, nucleus) -> bool: ...
def is_dropsub(self, nucleus) -> bool: ...
def is_slanted(self, nucleus) -> bool: ...
def is_between_brackets(self, s, loc): ...
def subsuper(self, s, loc, toks): ...
def style_literal(self, s, loc, toks): ...
def genfrac(self, s, loc, toks): ...
def frac(self, s, loc, toks): ...
def dfrac(self, s, loc, toks): ...
def binom(self, s, loc, toks): ...
overset = ...
def sqrt(self, s, loc, toks) -> list[Hlist]: ...
def overline(self, s, loc, toks) -> list[Hlist]: ...
def auto_delim(self, s, loc, toks) -> Hlist: ...