mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
d660f7f025
commit
34a2758d3c
@ -263,8 +263,11 @@ def generate_masthead(title, output_path=None, width=600, height=60):
|
|||||||
masthead_font_family = recs.get('masthead_font', 'Default')
|
masthead_font_family = recs.get('masthead_font', 'Default')
|
||||||
|
|
||||||
if masthead_font_family != 'Default':
|
if masthead_font_family != 'Default':
|
||||||
from calibre.utils.fonts.scanner import font_scanner
|
from calibre.utils.fonts.scanner import font_scanner, NoFonts
|
||||||
faces = font_scanner.fonts_for_family(masthead_font_family)
|
try:
|
||||||
|
faces = font_scanner.fonts_for_family(masthead_font_family)
|
||||||
|
except NoFonts:
|
||||||
|
faces = []
|
||||||
if faces:
|
if faces:
|
||||||
font_path = faces[0]['path']
|
font_path = faces[0]['path']
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user