View Single Post
Old 10-26-2015, 02:01 AM   #75
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: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
When fullScreenReading=true the following is added to the built-in KePub stylesheet:
Code:
img {
  display: block;
  margin-left: auto !important;
  margin-right: auto !important;
  width: auto !important;
  height: auto !important;
}
This has the bad effect of making images display centred on a seperate line when they should be displayed inline with the text of a paragraph.

The screenshots below show a book where the publisher has included an image of some hebrew letters (instead of doing a proper job and embedding a font containing glyphs for the letters) in the following way:
Code:
<p class="indent">It was quite by accident that Brother Francis finally 
discovered the pilgrim’s stone. While wandering thereabouts, he stumbled over the 
stake which the old man had driven into the ground as a marker. He found himself 
on his hands and knees staring at a pair of marks freshly chalked on an ancient 
stone: <img alt="image" height="15" src="images/Art_P11.jpg" width="18"/></p>
1. Unpatched, KePub, fullScreenReading=true
2. Patched, KePub, fullScreenReading=true
Click image for larger version

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

Name:	fsbug3-patched.png
Views:	541
Size:	90.1 KB
ID:	143171

This patch disables that added style by replacing img --> _mg, so that images are displayed the same way in KePub full-screen mode as they are in KePub normal reading mode (and ePubs in both modes).

Multi-version patch, paste into libnickel.so.1.0.0.patch:
Spoiler:
Code:
<Patch>
patch_name = `Disable KePub FullSceenReading block img style`
patch_enable = `yes`
# Multi-version patch: 3.3.0 - 3.18.0+
find_base_address = `\0i\0m\0g\0 \0{\0 \0d\0i\0s\0p\0l\0a\0y\0:\0 \0b\0l\0o\0c\0k\0;\0`
replace_string = 0001, `i`, `_`
</Patch>

Last edited by GeoffR; 10-26-2015 at 02:25 AM. Reason: ... some hebrew letters ...
GeoffR is offline   Reply With Quote