@@ -218,8 +218,7 @@ def _get_offset(self, font, glyph, fontsize, dpi):
218
218
219
219
# The return value of _get_info is cached per-instance.
220
220
def _get_info (self , fontname , font_class , sym , fontsize , dpi ):
221
- font , num , slanted = self ._get_glyph (
222
- fontname , font_class , sym , fontsize )
221
+ font , num , slanted = self ._get_glyph (fontname , font_class , sym )
223
222
font .set_size (fontsize , dpi )
224
223
glyph = font .load_char (
225
224
num , flags = self .mathtext_backend .get_hinting_type ())
@@ -307,7 +306,7 @@ def __init__(self, *args, **kwargs):
307
306
308
307
_slanted_symbols = set (r"\int \oint" .split ())
309
308
310
- def _get_glyph (self , fontname , font_class , sym , fontsize ):
309
+ def _get_glyph (self , fontname , font_class , sym ):
311
310
font = None
312
311
if fontname in self .fontmap and sym in latex_to_bakoma :
313
312
basename , num = latex_to_bakoma [sym ]
@@ -321,8 +320,7 @@ def _get_glyph(self, fontname, font_class, sym, fontsize):
321
320
if font is not None and font .get_char_index (num ) != 0 :
322
321
return font , num , slanted
323
322
else :
324
- return self ._stix_fallback ._get_glyph (
325
- fontname , font_class , sym , fontsize )
323
+ return self ._stix_fallback ._get_glyph (fontname , font_class , sym )
326
324
327
325
# The Bakoma fonts contain many pre-sized alternatives for the
328
326
# delimiters. The AutoSizedChar class will use these alternatives
@@ -435,7 +433,7 @@ def __init__(self, *args, **kwargs):
435
433
def _map_virtual_font (self , fontname , font_class , uniindex ):
436
434
return fontname , uniindex
437
435
438
- def _get_glyph (self , fontname , font_class , sym , fontsize ):
436
+ def _get_glyph (self , fontname , font_class , sym ):
439
437
try :
440
438
uniindex = get_unicode_index (sym )
441
439
found_symbol = True
@@ -477,8 +475,7 @@ def _get_glyph(self, fontname, font_class, sym, fontsize):
477
475
and isinstance (self ._fallback_font , StixFonts )):
478
476
fontname = 'rm'
479
477
480
- g = self ._fallback_font ._get_glyph (fontname , font_class ,
481
- sym , fontsize )
478
+ g = self ._fallback_font ._get_glyph (fontname , font_class , sym )
482
479
family = g [0 ].family_name
483
480
if family in list (BakomaFonts ._fontmap .values ()):
484
481
family = "Computer Modern"
@@ -488,7 +485,7 @@ def _get_glyph(self, fontname, font_class, sym, fontsize):
488
485
else :
489
486
if (fontname in ('it' , 'regular' )
490
487
and isinstance (self , StixFonts )):
491
- return self ._get_glyph ('rm' , font_class , sym , fontsize )
488
+ return self ._get_glyph ('rm' , font_class , sym )
492
489
_log .warning ("Font {!r} does not have a glyph for {!a} "
493
490
"[U+{:x}], substituting with a dummy "
494
491
"symbol." .format (new_fontname , sym , uniindex ))
@@ -529,20 +526,20 @@ def __init__(self, *args, **kwargs):
529
526
self .fontmap [key ] = fullpath
530
527
self .fontmap [name ] = fullpath
531
528
532
- def _get_glyph (self , fontname , font_class , sym , fontsize ):
529
+ def _get_glyph (self , fontname , font_class , sym ):
533
530
# Override prime symbol to use Bakoma.
534
531
if sym == r'\prime' :
535
- return self .bakoma ._get_glyph (fontname , font_class , sym , fontsize )
532
+ return self .bakoma ._get_glyph (fontname , font_class , sym )
536
533
else :
537
534
# check whether the glyph is available in the display font
538
535
uniindex = get_unicode_index (sym )
539
536
font = self ._get_font ('ex' )
540
537
if font is not None :
541
538
glyphindex = font .get_char_index (uniindex )
542
539
if glyphindex != 0 :
543
- return super ()._get_glyph ('ex' , font_class , sym , fontsize )
540
+ return super ()._get_glyph ('ex' , font_class , sym )
544
541
# otherwise return regular glyph
545
- return super ()._get_glyph (fontname , font_class , sym , fontsize )
542
+ return super ()._get_glyph (fontname , font_class , sym )
546
543
547
544
548
545
class DejaVuSerifFonts (DejaVuFonts ):
0 commit comments