Proper fix for the MOBI font size issue (got my input and output profiles mixed up)

This commit is contained in:
Kovid Goyal 2011-04-30 09:05:30 -06:00
parent d18a155ea7
commit 12649863c9

View File

@ -124,15 +124,16 @@ class Stylizer(object):
def __init__(self, tree, path, oeb, opts, profile=None, def __init__(self, tree, path, oeb, opts, profile=None,
extra_css='', user_css=''): extra_css='', user_css=''):
from calibre.customize.ui import input_profiles
self.oeb, self.opts = oeb, opts self.oeb, self.opts = oeb, opts
self.profile = None self.profile = profile
for x in input_profiles(): if self.profile is None:
if x.short_name == 'sony': from calibre.customize.ui import output_profiles
for x in output_profiles():
if x.short_name == 'default':
self.profile = x self.profile = x
break break
if self.profile is None: if self.profile is None:
self.profile = opts.input_profile self.profile = opts.output_profile
self.logger = oeb.logger self.logger = oeb.logger
item = oeb.manifest.hrefs[path] item = oeb.manifest.hrefs[path]
basename = os.path.basename(path) basename = os.path.basename(path)