@@ -121,7 +121,7 @@ def set_font( self, family=None, style="", size=0 ):
121121 log .info ( f"Font named { family = } + { features = } no match: { fname } " )
122122 if fname_best :
123123 log .warning ( f"Font named { family = } + { features = } loading: { fname_best } (as '{ family } { style } ')" )
124- self .add_font ( family = family , style = style , fname = fname_best )
124+ self .add_font ( family = family , style = style , fname = str ( fname_best ) )
125125 log .debug ( f"Fonts now: { commas ( self .fonts , final_and = True )} " )
126126 else :
127127 log .warning ( f"Font name { family = } and { features = } not found for: { fontkey } " )
@@ -404,7 +404,7 @@ def write_pdfs(
404404 group_threshold = group_threshold ,
405405 groups = groups ,
406406 master_secret = master_secret ,
407- passphrase = passphrase .encode ( 'utf -8' ) if passphrase else b'' ,
407+ passphrase = passphrase .encode ( 'UTF -8' ) if passphrase else b'' ,
408408 using_bip39 = using_bip39 , # Derive wallet Seed using BIP-39 Mnemonic + passphrase generation
409409 cryptopaths = cryptopaths ,
410410 )
@@ -418,11 +418,11 @@ def write_pdfs(
418418
419419 cover_text = None
420420 if cover_page :
421- cover_text = open (os .path .join (os .path .dirname (__file__ ), 'COVER.txt' )).read ()
421+ cover_text = open (os .path .join (os .path .dirname (__file__ ), 'COVER.txt' ), encoding = 'UTF-8' ).read ()
422422 if using_bip39 :
423- cover_text += open (os .path .join (os .path .dirname (__file__ ), 'COVER-BIP-39.txt' ) ).read ()
423+ cover_text += open (os .path .join (os .path .dirname (__file__ ), 'COVER-BIP-39.txt' , ), encoding = 'UTF-8' ).read ()
424424 else :
425- cover_text += open (os .path .join (os .path .dirname (__file__ ), 'COVER-SLIP-39.txt' )).read ()
425+ cover_text += open (os .path .join (os .path .dirname (__file__ ), 'COVER-SLIP-39.txt' ), encoding = 'UTF-8' ).read ()
426426
427427 # Generate each desired SLIP-39 Mnemonic cards PDF. Supports --card (the default). Remember
428428 # any deduced orientation and paper_format for below.
0 commit comments