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

Method __init__

lib/matplotlib/_afm.py:379–383  ·  view source on GitHub ↗

Parse the AFM file in file object *fh*.

(self, fh: BinaryIO)

Source from the content-addressed store, hash-verified

377class AFM:
378
379 def __init__(self, fh: BinaryIO):
380 """Parse the AFM file in file object *fh*."""
381 self._header = _parse_header(fh)
382 self._metrics, self._metrics_by_name = _parse_char_metrics(fh)
383 self._kern, self._composite = _parse_optional(fh)
384
385 def get_str_bbox_and_descent(self, s: str) -> tuple[int, int, float, int, int]:
386 """Return the string bounding box and the maximal descent."""

Callers

nothing calls this directly

Calls 3

_parse_headerFunction · 0.85
_parse_char_metricsFunction · 0.85
_parse_optionalFunction · 0.85

Tested by

no test coverage detected