Bases: yex.mode.mode.Mode
Source code in yex/mode/horizontal.py
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28 | def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
if not self.is_inner and (
self.to is not None or self.spread is not None):
raise ValueError("'to' and 'spread' can't be set on "
"outer horizontal modes because they're wordwrapped")
self._spaces = {}
# Requesting the font via subscripting is much slower than
# simply doing self.doc.font. But it has the advantage that
# if there's no font set, it will find one. So we call it
# once, here in the constructor.
self.doc['_font']
|