Fix #3019 (Problem converting prc to epub)

This commit is contained in:
Kovid Goyal 2009-07-31 13:12:29 -06:00
parent b166016da5
commit 2e8a3a28d9
3 changed files with 7 additions and 3 deletions

View File

@ -13,7 +13,7 @@ from calibre.devices.usbms.driver import USBMS
import calibre.devices.cybookg3.t2b as t2b
class CYBOOKG3(USBMS):
name = 'Cybook Gen 3 Device Interface'
name = 'Cybook Gen 3/Opus Device Interface'
description = _('Communicate with the Cybook eBook reader.')
author = _('John Schember')
supported_platforms = ['windows', 'osx', 'linux']
@ -31,7 +31,7 @@ class CYBOOKG3(USBMS):
WINDOWS_MAIN_MEM = 'CYBOOK_GEN3__-FD'
WINDOWS_CARD_A_MEM = 'CYBOOK_GEN3__-SD'
OSX_MAIN_MEM = 'Bookeen Cybook Gen3 -FD Media'
OSX_MAIN_MEM = ['Bookeen Cybook Gen3 -FD Media', 'Bookeen Cybook Opus -FD Media']
OSX_CARD_A_MEM = 'Bookeen Cybook Gen3 -SD Media'
MAIN_MEMORY_VOLUME_LABEL = 'Cybook Gen 3 Main Memory'

View File

@ -225,6 +225,7 @@ class Stylizer(object):
if 'font-size' in style:
size = style['font-size']
if size == 'normal': size = 'medium'
if size == 'smallest': size = 'xx-small'
if size in FONT_SIZE_NAMES:
style['font-size'] = "%dpt" % self.profile.fnames[size]
return style

View File

@ -213,7 +213,10 @@ class CSSFlattener(object):
esize = 7
cssdict['font-size'] = fnums[esize]
else:
cssdict['font-size'] = fnums[force_int(size)]
try:
cssdict['font-size'] = fnums[force_int(size)]
except:
cssdict['font-size'] = fnums[3]
del node.attrib['size']
if 'color' in node.attrib:
cssdict['color'] = node.attrib['color']