mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
Fix #939256 (Chinese characters shown as boxes in masthead image)
This commit is contained in:
parent
bef9a554a4
commit
aaf41d735d
@ -215,7 +215,11 @@ def unit_convert(value, base, font, dpi):
|
|||||||
def generate_masthead(title, output_path=None, width=600, height=60):
|
def generate_masthead(title, output_path=None, width=600, height=60):
|
||||||
from calibre.ebooks.conversion.config import load_defaults
|
from calibre.ebooks.conversion.config import load_defaults
|
||||||
from calibre.utils.fonts import fontconfig
|
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')
|
recs = load_defaults('mobi_output')
|
||||||
masthead_font_family = recs.get('masthead_font', 'Default')
|
masthead_font_family = recs.get('masthead_font', 'Default')
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user