Ensure primary-writing-mode is set when page-progression-direction is rtl

This commit is contained in:
Kovid Goyal 2017-04-25 18:46:56 +05:30
parent 3ae3950c52
commit 875af72918

View File

@ -225,6 +225,10 @@ class KF8Book(object):
self.used_images = writer.used_images
self.page_progression_direction = writer.oeb.spine.page_progression_direction
self.primary_writing_mode = writer.oeb.metadata.primary_writing_mode
if self.page_progression_direction == 'rtl' and not self.primary_writing_mode:
# Without this the Kindle renderer does not respect
# page_progression_direction
self.primary_writing_mode = 'horizontal-rl'
def build_records(self, writer, for_joint):
metadata = writer.oeb.metadata