Fix #939256 (Chinese characters shown as boxes in masthead image)

This commit is contained in:
Kovid Goyal 2012-02-23 12:16:05 +05:30
parent bef9a554a4
commit aaf41d735d

View File

@ -215,7 +215,11 @@ def unit_convert(value, base, font, dpi):
def generate_masthead(title, output_path=None, width=600, height=60):
from calibre.ebooks.conversion.config import load_defaults
from calibre.utils.fonts import fontconfig
font_path = default_font = P('fonts/liberation/LiberationSerif-Bold.ttf')
from calibre.utils.config import tweaks
fp = tweaks['generate_cover_title_font']
if not fp:
fp = P('fonts/liberation/LiberationSerif-Bold.ttf')
font_path = default_font = fp
recs = load_defaults('mobi_output')
masthead_font_family = recs.get('masthead_font', 'Default')