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

Method _width_of

lib/matplotlib/dviread.py:743–749  ·  view source on GitHub ↗

Width of char in dvi units.

(self, char)

Source from the content-addressed store, hash-verified

741 return f"<{type(self).__name__}: {self.texname}>"
742
743 def _width_of(self, char):
744 """Width of char in dvi units."""
745 metrics = self._metrics.get_metrics(char)
746 if metrics is None:
747 _log.debug('No width for char %d in font %s.', char, self.texname)
748 return 0
749 return _mul1220(metrics.tex_width, self._scale)
750
751 def _height_depth_of(self, char):
752 """Height and depth of char in dvi units."""

Callers 5

_put_char_realMethod · 0.95
_set_char_immediateMethod · 0.80
_set_charMethod · 0.80
_set_glyphsMethod · 0.80
_set_text_and_glyphsMethod · 0.80

Calls 2

_mul1220Function · 0.85
get_metricsMethod · 0.45

Tested by

no test coverage detected