diff --git a/fpdf/fpdf.py b/fpdf/fpdf.py index e93037dc5..b4b2dc06e 100644 --- a/fpdf/fpdf.py +++ b/fpdf/fpdf.py @@ -553,7 +553,7 @@ def add_font(self, family, style='', fname='', uni=False): 'name': font_dict['name'], 'desc': font_dict['desc'], 'up': font_dict['up'], 'ut': font_dict['ut'], 'cw': font_dict['cw'], - 'ttffile': font_dict['ttffile'], 'fontkey': fontkey, + 'ttffile': ttffilename, 'fontkey': fontkey, 'subset': sbarr, 'unifilename': unifilename, } self.font_files[fontkey] = {'length1': font_dict['originalsize'],