mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Minor tweaks to renderer profiles and CSS fixing.
This commit is contained in:
parent
e8f7219108
commit
5225b1f0b0
@ -47,15 +47,15 @@ PROFILES = {
|
|||||||
# No clue on usable screen size; DPI should be good
|
# No clue on usable screen size; DPI should be good
|
||||||
'HanlinV3':
|
'HanlinV3':
|
||||||
Profile(width=584, height=754, dpi=168.451, fbase=16,
|
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':
|
'CybookG3':
|
||||||
Profile(width=600, height=800, dpi=168.451, fbase=16,
|
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':
|
'Kindle':
|
||||||
Profile(width=525, height=640, dpi=168.451, fbase=16,
|
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':
|
'Browser':
|
||||||
Profile(width=800, height=600, dpi=100.0, fbase=12,
|
Profile(width=800, height=600, dpi=100.0, fbase=12,
|
||||||
|
@ -185,6 +185,8 @@ class CSSFlattener(object):
|
|||||||
percent = (margin - style['text-indent']) / style['width']
|
percent = (margin - style['text-indent']) / style['width']
|
||||||
cssdict['margin-left'] = "%d%%" % (percent * 100)
|
cssdict['margin-left'] = "%d%%" % (percent * 100)
|
||||||
left -= style['text-indent']
|
left -= style['text-indent']
|
||||||
|
if 'display' in cssdict and cssdict['display'] == 'in-line':
|
||||||
|
cssdict['display'] = 'inline'
|
||||||
if self.unfloat and 'float' in cssdict \
|
if self.unfloat and 'float' in cssdict \
|
||||||
and cssdict.get('display', 'none') != 'none':
|
and cssdict.get('display', 'none') != 'none':
|
||||||
del cssdict['display']
|
del cssdict['display']
|
||||||
|
Loading…
x
Reference in New Issue
Block a user