View Single Post
Old 03-19-2017, 01:35 PM   #19
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
`Force user line spacing in KePubs (more forceful version)`

Quote:
Originally Posted by the_Pan View Post
You're right, it's actually the book which prevent changing the line spacing, but also with the `Force user line spacing in KePubs' patch enabled.
Yes, there are still a number of things the publisher can do to prevent the line spacing being changed in KePubs even with the `Force user line spacing in KePubs` patch is enabled. One is to wrap each paragraph in a <span> and set the line spacing on the span. Another is to use the <font> shorthand style.

This is a more forceful version of the `Force user line spacing in KePubs` patch that should work in more cases (but still not all cases), but it could also have more severe side effects than the original patch. I'll include this as an option in the future if anyone finds it useful.
Spoiler:
Code:
<Patch>
patch_name = `Force user line spacing in KePubs (more forceful version)`
patch_enable = `yes`
#
## This patch will allow the line spacing set by the slider to take effect
## in some problem KePub books with fixed linespacing (including ones where the
## publisher has used <div> instead of <p> for paragraphs, or wrapped each
## paragraph in a <span> and set the line-height on the span.) However it might
## also override some line spacing that would better be left fixed, e.g. it can
## cause problems with the spacing of paragraphs beginning with a raise-cap.
#
# body, p { line-height: %1 ... }  -->  body *  { line-height: %1 ... }
#
#strings -tx -el libnickel.so.1.0.0 | grep "body, p { line-height: %1"
base_address = 9A0174
#base_address = 9A6220
replace_string = 0000, `b\0o\0d\0y\0,\0 \0p\0 \0{\0`, `b\0o\0d\0y\0 \0*\0 \0 \0{\0`
</Patch>


As usual, for perfect results without any side effects you would need to edit the book instead.
GeoffR is offline   Reply With Quote