@@ -419,12 +419,13 @@ def get_metrics(self, font, font_class, sym, fontsize, dpi, math=True):
419
419
Parameters
420
420
----------
421
421
font : str
422
- One of the TeX font names: tt, it, rm, cal, sf, bf, default/regular
423
- (non-math), bb, frak, scr.
422
+ One of the TeX font names: "tt", "it", "rm", "cal", "sf", "bf",
423
+ "default", "regular", "bb", "frak", "scr". "default" and "regular"
424
+ are synonyms and use the non-math font.
424
425
font_class : str
425
426
One of the TeX font names (as for *font*), but **not** bb, frak, or
426
- scr. This is used to combine e.g. "frak" with "bf" (the only
427
- combination that currently actually works) .
427
+ scr. This is used to combine two font classes. The only supported
428
+ combination currently is ``get_metrics("frak", "bf", ...)`` .
428
429
sym : str
429
430
A symbol in raw TeX form, e.g., "1", "x", or "\sigma".
430
431
fontsize : float
@@ -462,12 +463,13 @@ def set_canvas_size(self, w, h, d):
462
463
self .mathtext_backend .set_canvas_size (
463
464
self .width , self .height , self .depth )
464
465
465
- def render_glyph (self , ox , oy , facename , font_class , sym , fontsize , dpi ):
466
+ @cbook ._rename_parameter ("3.4" , "facename" , "font" )
467
+ def render_glyph (self , ox , oy , font , font_class , sym , fontsize , dpi ):
466
468
"""
467
469
At position (*ox*, *oy*), draw the glyph specified by the remaining
468
470
parameters (see `get_metrics` for their detailed description).
469
471
"""
470
- info = self ._get_info (facename , font_class , sym , fontsize , dpi )
472
+ info = self ._get_info (font , font_class , sym , fontsize , dpi )
471
473
self .used_characters .setdefault (info .font .fname , set ()).add (info .num )
472
474
self .mathtext_backend .render_glyph (ox , oy , info )
473
475
0 commit comments