@@ -296,23 +296,23 @@ def get_glyphs_tex(self, prop, s, glyph_map=None,
296
296
@functools .lru_cache (50 )
297
297
def _get_ps_font_and_encoding (texname ):
298
298
tex_font_map = dviread .PsfontsMap (dviread .find_tex_file ('pdftex.map' ))
299
- font_bunch = tex_font_map [texname ]
300
- if font_bunch .filename is None :
299
+ psfont = tex_font_map [texname ]
300
+ if psfont .filename is None :
301
301
raise ValueError (
302
- f"No usable font file found for { font_bunch .psname } "
303
- f"( { texname } ). The font may lack a Type-1 version." )
302
+ f"No usable font file found for { psfont .psname } ( { texname } ). "
303
+ f"The font may lack a Type-1 version." )
304
304
305
- font = get_font (font_bunch .filename )
305
+ font = get_font (psfont .filename )
306
306
307
- if font_bunch .encoding :
307
+ if psfont .encoding :
308
308
# If psfonts.map specifies an encoding, use it: it gives us a
309
309
# mapping of glyph indices to Adobe glyph names; use it to convert
310
310
# dvi indices to glyph names and use the FreeType-synthesized
311
311
# unicode charmap to convert glyph names to glyph indices (with
312
312
# FT_Get_Name_Index/get_name_index), and load the glyph using
313
313
# FT_Load_Glyph/load_glyph. (That charmap has a coverage at least
314
314
# as good as, and possibly better than, the native charmaps.)
315
- enc = dviread ._parse_enc (font_bunch .encoding )
315
+ enc = dviread ._parse_enc (psfont .encoding )
316
316
else :
317
317
# If psfonts.map specifies no encoding, the indices directly
318
318
# map to the font's "native" charmap; so don't use the
@@ -331,7 +331,7 @@ def _get_ps_font_and_encoding(texname):
331
331
break
332
332
else :
333
333
_log .warning ("No supported encoding in font (%s)." ,
334
- font_bunch .filename )
334
+ psfont .filename )
335
335
enc = None
336
336
337
337
return font , enc
0 commit comments