View Single Post
Old 06-07-2015, 12:09 AM   #16
GeoffR
Wizard
GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.
 
GeoffR's Avatar
 
Posts: 3,821
Karma: 19159830
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
Work-arounds for kepub problems in full-screen mode

(Note: From firmware version 3.19.5613 these three individual patches have been replaced by the single patch `Fix three KePub fullScreenReading bugs`.)

Firmware since version 3.3.0 has an undocumented FullScreenReading feature. (See Enabling undocumented features.) Full-screen reading mode works well with the EPUB reader, but there are three problems that affect the KEPUB reader:

Problem 1. If the kepub book's stylesheet has non-zero margin or padding on the body element, then the text is shifted to the right, possibly resulting in text being cut off at the right hand side.

For sideloaded kepubs this problem can be fixed without patching by adding body { margin: 0 !important; padding: 0 !important; } to the book's stylesheet (which can be done automatically when sending the book from Calibre by using the "Modify CSS" feature of the KoboTouch/KoboTouchExtended driver, or for selected books by using the "Append extra CSS" option of the Modify Epub plugin.)

For all kepubs both sideloaded and synced from Kobo, enabling the `KePub zero body margin/padding` patch will modify the device's built-in KePub stylesheet instead. The following screenshots (Glo, 3.12.1) show a kepub book synced from Kobo which exhibits this problem:
1. Unpatched,
2. Patched.
Click image for larger version

Name:	unpatched.png
Views:	2703
Size:	59.0 KB
ID:	139064Click image for larger version

Name:	patched.png
Views:	2617
Size:	60.6 KB
ID:	139065


Problem 2. For some fonts, characters with a large side-bearing value (such as Georgia italic f, J, etc.) get cut off if they appear at the end of a line. This problem can also affect kepubs in normal reading mode if the margin adjustment slider is set at minimum.

For sideloaded kepubs created by recent versions of Calibre's KoboTouchExtended driver, this problem can be fixed without patching by adding div#book-columns { padding: 0.2em !important; } to the book's stylesheet.

For most kepubs synced from Kobo or created with older versions of the KoboTouchExtended driver, the `Fix kepub side bearing font cut-off bug` patch can be used to add the appropriate padding to the device's built-in stylesheet instead. (Some changes to the default patch settings will be necessary for use with books in vertical languages such as Japanese, or ones created with old versions of the KoboTouchExtended driver.)

The following screenshots (Glo, 3.16.0) show a kepub book synced from Kobo in full-screen reading mode with a large font size to demonstrate the cut-off effect. Look at the letter f at the left of the fourth line from the bottom and at the right of the line above that to see the problem.
1. Unpatched
2. Patched
Click image for larger version

Name:	unpatched1.png
Views:	1954
Size:	103.0 KB
ID:	139270Click image for larger version

Name:	patched1.png
Views:	1865
Size:	103.0 KB
ID:	139271


Problem 3. Images which are supposed to be displayed inline (flowing with the text) are instead displayed centred on a seperate line.

This problem is can be fixed by applying the `Disable KePub FullSceenReading block img style` patch.

These screenshots (Glo, 3.18.0) show a page from this book which uses small bitmaps to represent some Hebrew letters. Note the second-to-last line of the page:
1. Unpatched
2. Patched
Click image for larger version

Name:	fsbug3-unpatched.png
Views:	1608
Size:	90.2 KB
ID:	144181 Click image for larger version

Name:	fsbug3-patched.png
Views:	1565
Size:	90.1 KB
ID:	144182

Last edited by GeoffR; 12-13-2015 at 06:51 PM. Reason: Added description of Problem 3.
GeoffR is offline   Reply With Quote