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

Method _make_space

site-packages/matplotlib/mathtext.py:2592–2602  ·  view source on GitHub ↗
(self, percentage)

Source from the content-addressed store, hash-verified

2590 return [hlist]
2591
2592 def _make_space(self, percentage):
2593 # All spaces are relative to em width
2594 state = self.get_state()
2595 key = (state.font, state.fontsize, state.dpi)
2596 width = self._em_width_cache.get(key)
2597 if width is None:
2598 metrics = state.font_output.get_metrics(
2599 state.font, rcParams['mathtext.default'], 'm', state.fontsize, state.dpi)
2600 width = metrics.advance
2601 self._em_width_cache[key] = width
2602 return Kern(width * percentage)
2603
2604 _space_widths = { r'\,' : 0.16667, # 3/18 em = 3 mu
2605 r'\thinspace' : 0.16667, # 3/18 em = 3 mu

Callers 3

spaceMethod · 0.95
customspaceMethod · 0.95
symbolMethod · 0.95

Calls 4

get_stateMethod · 0.95
KernClass · 0.85
get_metricsMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected