This commit is contained in:
@@ -549,9 +549,10 @@ class EPUBReader:
|
||||
default_font = Font()
|
||||
error_para.add_word(
|
||||
Word(
|
||||
f"Error loading chapter: {
|
||||
str(e)}",
|
||||
default_font))
|
||||
f"Error loading chapter: {str(e)}",
|
||||
default_font
|
||||
)
|
||||
)
|
||||
chapter.add_block(error_para)
|
||||
# Still add PageBreak even after error
|
||||
chapter.add_block(PageBreak())
|
||||
|
||||
@@ -110,8 +110,8 @@ class Font:
|
||||
logger.info(f"Loading bundled font from: {bundled_font_path}")
|
||||
self._font = ImageFont.truetype(bundled_font_path, self._font_size)
|
||||
logger.info(
|
||||
f"Successfully loaded bundled font at size {
|
||||
self._font_size}")
|
||||
f"Successfully loaded bundled font at size {self._font_size}"
|
||||
)
|
||||
else:
|
||||
# Only fall back to PIL's default font if bundled font is not
|
||||
# available
|
||||
|
||||
Reference in New Issue
Block a user