From 3f7843e9a7f04e7b6fd7109ce1e1ea1b0159627f Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 1 Jul 2018 15:35:59 +0300 Subject: apparently you can't adjust default epubjs theme --- js/read.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'js') diff --git a/js/read.js b/js/read.js index bc37f98..77570c7 100644 --- a/js/read.js +++ b/js/read.js @@ -180,12 +180,10 @@ function apply_styles() { var lineHeight = res[2] ? res[2] + "%" : DEFAULT_LINE_HEIGHT + "%"; var themeName = res[3] ? res[3] : false; - window.book.rendition.themes.default({ - html: { - 'font-size': fontSize, - 'font-family': fontFamily, - 'line-height': lineHeight, - } + $.each(window.book.rendition.getContents(), function(i, c) { + c.css("font-size", fontSize); + c.css("font-family", fontFamily); + c.css("line-height", lineHeight); }); apply_theme(); -- cgit v1.2.3