mirror of
https://github.com/Yuvi9587/Kemono-Downloader.git
synced 2025-12-17 23:47:15 +00:00
Update workers.py
This commit is contained in:
parent
d49c739fe4
commit
ee00019f2e
@ -1320,7 +1320,9 @@ class PostProcessorWorker:
|
||||
if FPDF:
|
||||
self.logger(f" Converting to PDF...")
|
||||
pdf = PDF()
|
||||
font_path = os.path.join(self.app_base_dir, 'data', 'dejavu-sans', 'DejaVuSans.ttf')
|
||||
font_path = ""
|
||||
if self.project_root_dir:
|
||||
font_path = os.path.join(self.project_root_dir, 'data', 'dejavu-sans', 'DejaVuSans.ttf')
|
||||
try:
|
||||
if not os.path.exists(font_path): raise RuntimeError(f"Font file not found: {font_path}")
|
||||
pdf.add_font('DejaVu', '', font_path, uni=True)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user