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

Method get_kern_dist_from_name

lib/matplotlib/_afm.py:435–439  ·  view source on GitHub ↗

Return the kerning pair distance (possibly 0) for chars *name1* and *name2*.

(self, name1: str, name2: str)

Source from the content-addressed store, hash-verified

433 return self._metrics_by_name[name].width
434
435 def get_kern_dist_from_name(self, name1: str, name2: str) -> float:
436 """
437 Return the kerning pair distance (possibly 0) for chars *name1* and *name2*.
438 """
439 return self._kern.get((name1, name2), 0)
440
441 def get_fontname(self) -> str:
442 """Return the font name, e.g., 'Times-Roman'."""

Callers 2

test_afm_kerningFunction · 0.95
draw_textMethod · 0.80

Calls 1

getMethod · 0.45

Tested by 1

test_afm_kerningFunction · 0.76