mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Conversion: When converting with font size rescaling disabled, convert font size names to rem unit rather than pt units. Fixes #1809671 [AZW3 conversion generates font-sizes in points](https://bugs.launchpad.net/calibre/+bug/1809671)
These give better results with kindle previewer when converting to AZW3 and are more re-scaleable in general.
This commit is contained in:
parent
d52a471481
commit
8179235f2d
@ -336,7 +336,7 @@ class Stylizer(object):
|
||||
if size == 'smallest':
|
||||
size = 'xx-small'
|
||||
if size in FONT_SIZE_NAMES:
|
||||
style['font-size'] = "%dpt" % self.profile.fnames[size]
|
||||
style['font-size'] = "%.1frem" % (self.profile.fnames[size] / float(self.profile.fbase))
|
||||
if '-epub-writing-mode' in style:
|
||||
for x in ('-webkit-writing-mode', 'writing-mode'):
|
||||
style[x] = style.get(x, style['-epub-writing-mode'])
|
||||
|
Loading…
x
Reference in New Issue
Block a user