MCPcopy Create free account
hub / github.com/ColdGrub1384/Pyto / Kern

Class Kern

site-packages/matplotlib/mathtext.py:1930–1957  ·  view source on GitHub ↗

A :class:`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

Source from the content-addressed store, hash-verified

1928 Vlist.__init__(self, [SsGlue()] + elements + [SsGlue()])
1929
1930class Kern(Node):
1931 """
1932 A :class:`Kern` node has a width field to specify a (normally
1933 negative) amount of spacing. This spacing correction appears in
1934 horizontal lists between letters like A and V when the font
1935 designer said that it looks better to move them closer together or
1936 further apart. A kern node can also appear in a vertical list,
1937 when its *width* denotes additional spacing in the vertical
1938 direction.
1939 """
1940 height = 0
1941 depth = 0
1942
1943 def __init__(self, width):
1944 Node.__init__(self)
1945 self.width = width
1946
1947 def __repr__(self):
1948 return "k%.02f" % self.width
1949
1950 def shrink(self):
1951 Node.shrink(self)
1952 if self.size < NUM_SIZE_LEVELS:
1953 self.width *= SHRINK_FACTOR
1954
1955 def grow(self):
1956 Node.grow(self)
1957 self.width *= GROW_FACTOR
1958
1959class SubSuperCluster(Hlist):
1960 """

Callers 4

kernMethod · 0.85
_make_spaceMethod · 0.85
subsuperMethod · 0.85
sqrtMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected