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

Method get_metrics

lib/matplotlib/_mathtext.py:265–292  ·  view source on GitHub ↗

r""" Parameters ---------- font : str One of the TeX font names: "tt", "it", "rm", "cal", "sf", "bf", "default", "regular", "normal", "bb", "frak", "scr". "default" and "regular" are synonyms and use the non-math font. "normal"

(self, font: str, font_class: str, sym: str, fontsize: float,
                    dpi: float)

Source from the content-addressed store, hash-verified

263 raise NotImplementedError
264
265 def get_metrics(self, font: str, font_class: str, sym: str, fontsize: float,
266 dpi: float) -> FontMetrics:
267 r"""
268 Parameters
269 ----------
270 font : str
271 One of the TeX font names: "tt", "it", "rm", "cal", "sf", "bf",
272 "default", "regular", "normal", "bb", "frak", "scr". "default"
273 and "regular" are synonyms and use the non-math font.
274 "normal" denotes the normal math font.
275 font_class : str
276 One of the TeX font names (as for *font*), but **not** "bb",
277 "frak", or "scr". This is used to combine two font classes. The
278 only supported combination currently is ``get_metrics("frak", "bf",
279 ...)``.
280 sym : str
281 A symbol in raw TeX form, e.g., "1", "x", or "\sigma".
282 fontsize : float
283 Font size in points.
284 dpi : float
285 Rendering dots-per-inch.
286
287 Returns
288 -------
289 FontMetrics
290 """
291 info = self._get_info(font, font_class, sym, fontsize, dpi)
292 return info.metrics
293
294 def render_glyph(self, output: Output, ox: float, oy: float, font: str,
295 font_class: str, sym: str, fontsize: float, dpi: float) -> None:

Callers 5

get_axis_heightMethod · 0.45
get_quadMethod · 0.45
get_xheightMethod · 0.45
_update_metricsMethod · 0.45
_update_metricsMethod · 0.45

Calls 1

_get_infoMethod · 0.95

Tested by

no test coverage detected