From 043c5cbfe5ff2685a52f3aef35d1864330815d13 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 29 Aug 2017 08:39:45 +0530 Subject: [PATCH] Conversion: Expand -epub-writing-mode to -webkit-writing-mode and writing-mode properties for maximum compatibility. Fixes #1713509 [epub's -webkit-writing-mode not converted to -webkit-writing-mode in azw3](https://bugs.launchpad.net/calibre/+bug/1713509) --- src/calibre/ebooks/oeb/stylizer.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/calibre/ebooks/oeb/stylizer.py b/src/calibre/ebooks/oeb/stylizer.py index 68ada13229..bead48ba01 100644 --- a/src/calibre/ebooks/oeb/stylizer.py +++ b/src/calibre/ebooks/oeb/stylizer.py @@ -341,6 +341,9 @@ class Stylizer(object): size = 'xx-small' if size in FONT_SIZE_NAMES: style['font-size'] = "%dpt" % self.profile.fnames[size] + if '-epub-writing-mode' in style: + for x in ('-webkit-writing-mode', 'writing-mode'): + style[x] = style.get(x, style['-epub-writing-mode']) return style def _apply_text_align(self, text):