MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / Kern

Class Kern

lib/matplotlib/_mathtext.py:1615–1639  ·  view source on GitHub ↗

A `Kern` node has a width field to specify a (normally negative) amount of spacing. This spacing correction appears in horizontal lists between letters like A and V when the font designer said that it looks better to move them closer together or further apart. A kern node can al

Source from the content-addressed store, hash-verified

1613
1614
1615class Kern(Node):
1616 """
1617 A `Kern` node has a width field to specify a (normally
1618 negative) amount of spacing. This spacing correction appears in
1619 horizontal lists between letters like A and V when the font
1620 designer said that it looks better to move them closer together or
1621 further apart. A kern node can also appear in a vertical list,
1622 when its *width* denotes additional spacing in the vertical
1623 direction.
1624 """
1625
1626 height = 0
1627 depth = 0
1628
1629 def __init__(self, width: float):
1630 super().__init__()
1631 self.width = width
1632
1633 def __repr__(self) -> str:
1634 return "k%.02f" % self.width
1635
1636 def shrink(self) -> None:
1637 super().shrink()
1638 if self.size < NUM_SIZE_LEVELS:
1639 self.width *= SHRINK_FACTOR
1640
1641
1642class AutoHeightChar(Hlist):

Callers 7

kernMethod · 0.85
_make_spaceMethod · 0.85
llapMethod · 0.85
rlapMethod · 0.85
subsuperMethod · 0.85
sqrtMethod · 0.85
underlineMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…