From 5225b1f0b0e4efc140f4b2f2723c7bc505caa3ef Mon Sep 17 00:00:00 2001 From: "Marshall T. Vandegrift" Date: Fri, 16 Jan 2009 20:02:05 -0500 Subject: [PATCH] Minor tweaks to renderer profiles and CSS fixing. --- src/calibre/ebooks/oeb/profile.py | 6 +++--- src/calibre/ebooks/oeb/transforms/flatcss.py | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/calibre/ebooks/oeb/profile.py b/src/calibre/ebooks/oeb/profile.py index e1fdcff13f..17408fac78 100644 --- a/src/calibre/ebooks/oeb/profile.py +++ b/src/calibre/ebooks/oeb/profile.py @@ -47,15 +47,15 @@ PROFILES = { # No clue on usable screen size; DPI should be good 'HanlinV3': Profile(width=584, height=754, dpi=168.451, fbase=16, - fsizes=[12, 12, 14, 16, 18, 21, 24, 28]), + fsizes=[12, 12, 14, 16, 18, 20, 22, 24]), 'CybookG3': Profile(width=600, height=800, dpi=168.451, fbase=16, - fsizes=[12, 12, 14, 16, 18, 21, 24, 28]), + fsizes=[12, 12, 14, 16, 18, 20, 22, 24]), 'Kindle': Profile(width=525, height=640, dpi=168.451, fbase=16, - fsizes=[12, 12, 14, 16, 18, 21, 24, 28]), + fsizes=[12, 12, 14, 16, 18, 20, 22, 24]), 'Browser': Profile(width=800, height=600, dpi=100.0, fbase=12, diff --git a/src/calibre/ebooks/oeb/transforms/flatcss.py b/src/calibre/ebooks/oeb/transforms/flatcss.py index 8358e2cf0b..7110c2db2d 100644 --- a/src/calibre/ebooks/oeb/transforms/flatcss.py +++ b/src/calibre/ebooks/oeb/transforms/flatcss.py @@ -185,6 +185,8 @@ class CSSFlattener(object): percent = (margin - style['text-indent']) / style['width'] cssdict['margin-left'] = "%d%%" % (percent * 100) left -= style['text-indent'] + if 'display' in cssdict and cssdict['display'] == 'in-line': + cssdict['display'] = 'inline' if self.unfloat and 'float' in cssdict \ and cssdict.get('display', 'none') != 'none': del cssdict['display']