View Single Post
Old 01-31-2015, 04:06 AM   #160
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
Quote:
Originally Posted by truemarine View Post
Thanks for the patch provided. Is is possible to have control over line spacing and justification seperately? I prefer to have control over line spacing only, for example. In case I really need to override the justification setting, most of the time the epub file needs some modification to itself...
I could make a patch that only forces the line spacing and doesn't affect the justification, but I would need to alter some oter patches to get it to fit. Do you use the fixed or adjustable top/bottom margin patches?

Edit: Here is a patch to replace the `Enforce user line spacing and justification in ePubs` patch which only affects line spacing. You will need to disable the `Unitless ePub line height` and any of the fixed/adjustable top/bottom margin patches to use it though.
Spoiler:
Code:
<Patch>
patch_name = `Enforce user line spacing in ePubs (testing)`
patch_enable = `yes`
#
# Disable the `Unitless ePub line height` patch before enabling this patch.
# (This patch includes the effect of the `Unitless ePub line height` patch.)
#
# This patch is incompatible with the `ePub fixed/adjustable top/bottom
# margin` patches, disable them if using this patch.
#
# This patch causes the line spacing setting selected from the reading settings
# (Aa) menu to be applied at body and paragraph level, instead of just at body
# level. This will result in the line spacing setting taking effect for some
# books where it wouldn't before, but there may still be some books where it
# won't take effect (such as those where the publisher has used <div> instead
# of <p> for paragraphs), and there may also be some books where it does take
# effect when it shouldn't (such as those where the publisher has used <p>
# instead of <h1>, <h2>, etc. for headings). The only way to get perfect
# results is to edit the epub and fix the problems at source.
#
replace_string = C99B3C, `\x20\x00l\x00i\x00n\x00e\x00-\x00h\x00e\x00i\x00g\x00h\x00t\x00:\x00 \x00%\x001\x00e\x00m\x00 \x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00\n\x00`, `}\x00b\x00o\x00d\x00y\x00,\x00p\x00{\x00l\x00i\x00n\x00e\x00-\x00h\x00e\x00i\x00g\x00h\x00t\x00:\x00%\x001\x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00`
#
replace_string = C99B8C, `\x20\x00p\x00a\x00d\x00d\x00i\x00n\x00g\x00-\x00b\x00o\x00t\x00t\x00o\x00m\x00:\x00 \x00%\x001\x00e\x00m\x00 \x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00\n\x00`, `t\x00}\x00 \x00b\x00o\x00d\x00y\x00 \x00{\x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00\n\x00`
</Patch>

Last edited by GeoffR; 01-31-2015 at 04:58 AM. Reason: Added `Enforce user line spacing in ePubs (testing)` patch.
GeoffR is offline   Reply With Quote