mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-05 00:24:41 +01:00
Force default font-size in CSS flattening.
This commit is contained in:
parent
35fce76007
commit
68fe7a1e8e
1 changed files with 4 additions and 4 deletions
|
|
@ -172,11 +172,11 @@ def flatten_node(self, node, stylizer, names, styles, psize, left=0):
|
|||
if 'bgcolor' in node.attrib:
|
||||
cssdict['background-color'] = node.attrib['bgcolor']
|
||||
del node.attrib['bgcolor']
|
||||
if 'font-size' in cssdict or tag == 'body':
|
||||
fsize = self.fmap[style['font-size']]
|
||||
cssdict['font-size'] = "%0.5fem" % (fsize / psize)
|
||||
psize = fsize
|
||||
if cssdict:
|
||||
if 'font-size' in cssdict:
|
||||
fsize = self.fmap[style['font-size']]
|
||||
cssdict['font-size'] = "%0.5fem" % (fsize / psize)
|
||||
psize = fsize
|
||||
if self.lineh and self.fbase and tag != 'body':
|
||||
self.clean_edges(cssdict, style, psize)
|
||||
margin = style['margin-left']
|
||||
|
|
|
|||
Loading…
Reference in a new issue