Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader > Kobo Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 12-15-2014, 02:48 PM   #61
npr
Zealot
npr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five words
 
Posts: 103
Karma: 37418
Join Date: Jan 2013
Device: Kobo Glo, Aura, H2OE2, Libra 2
Quote:
Originally Posted by GeoffR View Post
Have you tried without the footer patch?
Yes it looks like the issue is the same with or without the footer patch enabled.
The following shows the font size v line height where the issue just starts to show on my reader (6" Aura) with side loaded kepub.

Quote:
No footer patch:

Just starting to show with smallest font size:
readingFontSize=16
readingLineHeight=0.9

Just starting to show with my prefered font size:
readingFontSize=41
readingLineHeight=0.82

Just starting to show with the largest font:
readingFontSize=64
readingLineHeight=0.8
Quote:
With footer patch:

Just starting to show with smallest font size:
readingFontSize=16
readingLineHeight=0.9

Just starting to show with my prefered font size:
readingFontSize=40
readingLineHeight=0.84

Just starting to show with the largest font:
readingFontSize=64
readingLineHeight=0.8
When I get chance I'll repeat the above using 3.11.0.
My memory says that firmware was better but I may be mistaken.

@Anak
It was the installed kobo font Georgia.

Last edited by npr; 12-15-2014 at 02:53 PM.
npr is offline   Reply With Quote
Old 12-15-2014, 07:24 PM   #62
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
I've updated the `Fix kepub full-screen mode side bearing cut-off bug` patch in post #57, it is now okay to use it with vertical text direction books.
GeoffR is offline   Reply With Quote
Advert
Old 12-15-2014, 07:29 PM   #63
jlinear
Connoisseur
jlinear rocks like Gibraltar!jlinear rocks like Gibraltar!jlinear rocks like Gibraltar!jlinear rocks like Gibraltar!jlinear rocks like Gibraltar!jlinear rocks like Gibraltar!jlinear rocks like Gibraltar!jlinear rocks like Gibraltar!jlinear rocks like Gibraltar!jlinear rocks like Gibraltar!jlinear rocks like Gibraltar!
 
Posts: 56
Karma: 100000
Join Date: Oct 2014
Location: Ann Arbor, MI USA
Device: Kobo Aura One, Libra 2, Paperwhite
Quote:
Originally Posted by npr View Post
I am however having a problem with the custom footer in this new firmware, it look to me as though something else may have changed with the way pages are displayed. Most combinations of font size and line size give marks at the bottom of each page. The following page has bits missing from the top of tall characters which correspond with the marks on the previous page. Firmware 3.11.0 and patch gave me much better looking pages.
I'm noticing this as well with my side-loaded kepubs (with Calibre) using a side-loaded font (Charis SIL ModifiedLarger). The extra marks at the bottom of some pages are evident but the missing tops on the subsequent top of pages is not so evident to my eyes. I seem to be able to eliminate the bottom marks using the appropriate combination of font size and line spacing although I have tested this with only a few ebooks.

A thank you to GeoffR for the new patch.
jlinear is offline   Reply With Quote
Old 12-16-2014, 06:30 AM   #64
npr
Zealot
npr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five words
 
Posts: 103
Karma: 37418
Join Date: Jan 2013
Device: Kobo Glo, Aura, H2OE2, Libra 2
Quote:
Originally Posted by GeoffR View Post
I've updated the `Fix kepub full-screen mode side bearing cut-off bug` patch in post #57, it is now okay to use it with vertical text direction books.
The patch installs ok on my 6" Aura, side-loaded kepubs, kobo font Georgia.

Calibre generated kepubs side-loaded, kobo Georgia font:
The very tip of "f's" are cut off, ie about half the circle at the top right of the "f" is cut off.
To my eyes it's not really noticeable unless your told it's there.
Interestingly on my device the tips of "f's" are cut off both in full screen and standard screen.

I also tried a Kobo loaded kepub, again using Georgia font:
Without the patch the "f's" were cut off pretty much the same as above in both full screen and standard screen.
With the patch however the "f's" were ok in both screen mode.
npr is offline   Reply With Quote
Old 12-16-2014, 09:13 AM   #65
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
Kepub built-in stylesheet typo?

I found what looks like a typo, a missing period, in the built-in kepub stylesheet (highlighted in red, I've added some line breaks):

.KBHighlighting { background-color: #C6C6C6 !important; }
.KBStackKeyword, .KBSearchResult, .KBAnnotation,
.KBHighlighting , KBAuthorAnnotation{ font-size: 100% !important; -webkit-text-combine: inherit !important; }
.KBSearchResult { background-color: #C6C6C6 !important; }
.KBStackKeyword a { color: black !important; }
.KBAuthorAnnotation, .KBAuthorAnnotationContinued { background-color: transparent !important; text-decoration: none !important; }
.KBStackKeyword[writingMode="horizontal-tb"] a { border-bottom: 1px solid black !important; }
.KBAuthorAnnotation[writingMode="horizontal-tb"], .KBAuthorAnnotationContinued[writingMode="horizontal-tb"] { border-bottom: 2px dotted black !important; }


I don't know what effect it has, if any. (I don't use annotations much.)

The `Fix kepub full-screen mode side bearing cut-off bug` patch fixes the typo, since that patch has to re-arrange that part of the stylesheet, but I'll include a seperate fix here for use without that patch, if anyone wants to test it.

Code:
<Patch>
patch_name = `Fix kepub annotations stylesheet typo`
patch_enable = `yes`
replace_bytes = DB456A, 20, 2E
</Patch>

Last edited by GeoffR; 12-16-2014 at 09:16 AM. Reason: added title
GeoffR is offline   Reply With Quote
Advert
Old 12-16-2014, 04:02 PM   #66
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
I've updated the `Fix kepub full-screen mode side bearing cut-off bug` patch in post #57.

It now adds padding in units of 0.1em (with an alternative for units of 1%) to div#book-inner, and is a bit more compact.

It only works with synced kepubs, but another patch that works with sideloaded kepubs too might be possible.

I am using the patch myself, but I mainly just use the Georgia font. If you use different fonts and find that characters are still cut off, try increasing the amount of padding from 0.1em to 0.2em or more.

Last edited by GeoffR; 12-16-2014 at 04:06 PM.
GeoffR is offline   Reply With Quote
Old 12-16-2014, 05:48 PM   #67
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
Yet another update for the `Fix kepub side bearing font cut off bug` patch in post #57.

I've added another patch that should work for sideloaded kepubs too, although it may work a bit differently on sideloaded than synced kepubs, and there might be some unwanted side-effects on sideloaded kepubs, so testing welcome.

Edit: Actually, I can think of a number of problems that will occur with sideloaded kepubs, and for some books they might be worse than the original problem. I think the only real solution (other than Kobo fixing the bug in the kepub reader) is to change Calibre to add the parts to the kepubs that it creates which are currently missing. (The book-columns and book-inner divs.)

Edit2: Updated patch again, this one should have fewer side effects on the layout of sideloaded kepubs.

Last edited by GeoffR; 12-16-2014 at 08:18 PM. Reason: Updated patch again ...
GeoffR is offline   Reply With Quote
Old 12-16-2014, 10:44 PM   #68
scoky
Connoisseur
scoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy blue
 
Posts: 62
Karma: 13112
Join Date: Feb 2013
Device: Kindle Paperwhite; KOBO AURA HD
Quote:
Originally Posted by GeoffR View Post
Yet another update for the `Fix kepub side bearing font cut off bug` patch in post #57.

I've added another patch that should work for sideloaded kepubs too, although it may work a bit differently on sideloaded than synced kepubs, and there might be some unwanted side-effects on sideloaded kepubs, so testing welcome.

Edit: Actually, I can think of a number of problems that will occur with sideloaded kepubs, and for some books they might be worse than the original problem. I think the only real solution (other than Kobo fixing the bug in the kepub reader) is to change Calibre to add the parts to the kepubs that it creates which are currently missing. (The book-columns and book-inner divs.)

Edit2: Updated patch again, this one should have fewer side effects on the layout of sideloaded kepubs.
Now the patch works very well for my kepubs. But for some vertical books like chinese or japanese books they are need the padding-bottom and padding-top modification, could you give me a version including this two settings? Thanks!
scoky is offline   Reply With Quote
Old 12-16-2014, 11:15 PM   #69
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 scoky View Post
Now the patch works very well for my kepubs. But for some vertical books like chinese or japanese books they are need the padding-bottom and padding-top modification, could you give me a version including this two settings? Thanks!
I didn't think of that. I will have to add padding to all four sides, as there won't be enough room in the stylesheet to add it to just two sides conditionally based on the current writing direction. That will be no problem for synced kepubs, but it is likely to cause problems with some sideloaded kepubs.
GeoffR is offline   Reply With Quote
Old 12-17-2014, 02:54 AM   #70
scoky
Connoisseur
scoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy blue
 
Posts: 62
Karma: 13112
Join Date: Feb 2013
Device: Kindle Paperwhite; KOBO AURA HD
Quote:
Originally Posted by GeoffR View Post
I didn't think of that. I will have to add padding to all four sides, as there won't be enough room in the stylesheet to add it to just two sides conditionally based on the current writing direction. That will be no problem for synced kepubs, but it is likely to cause problems with some sideloaded kepubs.
Could these four padding be written like this?
Code:
body p,body div{padding:0.1em!important}
and there will be enough room.
scoky is offline   Reply With Quote
Old 12-17-2014, 03:02 AM   #71
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
Update for the `Fix kepub side bearing font cut off bug` patchs in post #57. I've added options to the patches to allow for vertical language books:

For the "synced kepubs only" patch there are three options: left/right padding, top/bottom padding, or all four sides (default). The default option should work okay with both horizontal and vertical language kepubs.

For the "all kepubs (synced and sideloaded)" patch there are only two options: left/right padding, or top/bottom padding. This means you need to choose whether to fix the bug for horizontal language kepubs or vertical language kepubs, there is no option that works with both.

The problem with the sideloaded kepubs is that adding padding on all four sides will cause major side effects such as increased space between paragraphs. It would be possible to add padding to left/right or top/bottom depending on the text writing direction of the current book if there was enough space in the stylesheet, but there is just not enough room.

Quote:
Originally Posted by scoky View Post
Could these four padding be written like this?
Code:
body p,body div{padding:0.1em!important}
and there will be enough room.
I can create the patch like that if you want, but I think it will probably have big effects on the layout. I think what really needs to be done is something like this, once for each writing direction:
Code:
body[writingMode="horizontal-tb"] p, body[writingMode="horizontal-tb"] div {padding-left:0.1em!important;padding-right:0.1em!important}
Here is a patch for all kepubs that adds padding to all four sides. Let me know if it is worthwhile adding this as an option for sideloaded kepubs, or does it just have too many side effects on layout:
Spoiler:
Code:
<Patch>
patch_name = `Fix kepub side bearing font cut-off bug (all kepubs, padding all sides)`
patch_enable = `yes`
#
# This patch adds the following line to the built-in kepub stylesheet:
#
#   body p,body div{padding:0.1em 0.1em 0.1em 0.1em!important}
#
replace_string = DB4470, `.\x00K\x00B\x00H\x00i\x00g\x00h\x00l\x00i\x00g\x00h\x00t\x00i\x00n\x00g\x00 \x00{\x00 \x00b\x00a\x00c\x00k\x00g\x00r\x00o\x00u\x00n\x00d\x00-\x00c\x00o\x00l\x00o\x00r\x00:\x00 \x00#\x00C\x006\x00C\x006\x00C\x006\x00 \x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00 \x00}\x00 \x00\t\x00`, `.\x00K\x00B\x00H\x00i\x00g\x00h\x00l\x00i\x00g\x00h\x00t\x00i\x00n\x00g\x00{\x00b\x00a\x00c\x00k\x00g\x00r\x00o\x00u\x00n\x00d\x00-\x00c\x00o\x00l\x00o\x00r\x00:\x00#\x00C\x006\x00C\x006\x00C\x006\x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00}\x00.\x00K\x00B\x00S\x00t\x00a\x00c\x00`
#
replace_string = DB44E6, `.\x00K\x00B\x00S\x00t\x00a\x00c\x00k\x00K\x00e\x00y\x00w\x00o\x00r\x00d\x00,\x00 \x00.\x00K\x00B\x00S\x00e\x00a\x00r\x00c\x00h\x00R\x00e\x00s\x00u\x00l\x00t\x00,\x00 \x00.\x00K\x00B\x00A\x00n\x00n\x00o\x00t\x00a\x00t\x00i\x00o\x00n\x00,\x00 \x00.\x00K\x00B\x00H\x00i\x00g\x00h\x00l\x00i\x00g\x00h\x00t\x00i\x00n\x00g\x00 \x00,\x00 \x00K\x00B\x00A\x00u\x00t\x00h\x00o\x00r\x00A\x00n\x00n\x00o\x00t\x00a\x00t\x00i\x00o\x00n\x00{\x00 \x00f\x00o\x00n\x00t\x00-\x00s\x00i\x00z\x00e\x00:\x00 \x001\x000\x000\x00%\x00 \x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00 \x00-\x00w\x00e\x00b\x00k\x00i\x00t\x00-\x00t\x00e\x00x\x00t\x00-\x00c\x00o\x00m\x00b\x00i\x00n\x00e\x00:\x00 \x00i\x00n\x00h\x00e\x00r\x00i\x00t\x00 \x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00 \x00}\x00 \x00\t\x00`, `k\x00K\x00e\x00y\x00w\x00o\x00r\x00d\x00,\x00.\x00K\x00B\x00S\x00e\x00a\x00r\x00c\x00h\x00R\x00e\x00s\x00u\x00l\x00t\x00,\x00.\x00K\x00B\x00A\x00n\x00n\x00o\x00t\x00a\x00t\x00i\x00o\x00n\x00,\x00.\x00K\x00B\x00H\x00i\x00g\x00h\x00l\x00i\x00g\x00h\x00t\x00i\x00n\x00g\x00,\x00 \x00K\x00B\x00A\x00u\x00t\x00h\x00o\x00r\x00A\x00n\x00n\x00o\x00t\x00a\x00t\x00i\x00o\x00n\x00{\x00f\x00o\x00n\x00t\x00-\x00s\x00i\x00z\x00e\x00:\x001\x000\x000\x00%\x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00-\x00w\x00e\x00b\x00k\x00i\x00t\x00-\x00t\x00e\x00x\x00t\x00-\x00c\x00o\x00m\x00b\x00i\x00n\x00e\x00:\x00i\x00n\x00h\x00e\x00r\x00i\x00t\x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00}\x00.\x00K\x00B\x00S\x00e\x00a\x00r\x00c\x00h\x00R\x00e\x00s\x00u\x00l\x00t\x00{\x00b\x00a\x00c\x00k\x00`
#
replace_string = DB4626, `.\x00K\x00B\x00S\x00e\x00a\x00r\x00c\x00h\x00R\x00e\x00s\x00u\x00l\x00t\x00 \x00{\x00 \x00b\x00a\x00c\x00k\x00g\x00r\x00o\x00u\x00n\x00d\x00-\x00c\x00o\x00l\x00o\x00r\x00:\x00 \x00#\x00C\x006\x00C\x006\x00C\x006\x00 \x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00 \x00}\x00 \x00\t\x00`, `g\x00r\x00o\x00u\x00n\x00d\x00-\x00c\x00o\x00l\x00o\x00r\x00:\x00#\x00C\x006\x00C\x006\x00C\x006\x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00}\x00.\x00K\x00B\x00S\x00t\x00a\x00c\x00k\x00K\x00e\x00y\x00w\x00o\x00r\x00d\x00 \x00a\x00{\x00c\x00o\x00l\x00o\x00r\x00:\x00b\x00l\x00a\x00`
#
replace_string = DB469C, `.\x00K\x00B\x00S\x00t\x00a\x00c\x00k\x00K\x00e\x00y\x00w\x00o\x00r\x00d\x00 \x00a\x00 \x00{\x00 \x00c\x00o\x00l\x00o\x00r\x00:\x00 \x00b\x00l\x00a\x00c\x00k\x00 \x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00 \x00}\x00 \x00\t\x00`, `c\x00k\x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00}\x00.\x00K\x00B\x00A\x00u\x00t\x00h\x00o\x00r\x00A\x00n\x00n\x00o\x00t\x00a\x00t\x00i\x00o\x00n\x00,\x00.\x00K\x00B\x00A\x00u\x00t\x00h\x00o\x00r\x00A\x00n\x00n\x00o\x00t\x00`
#
replace_string = DB46FC, `.\x00K\x00B\x00A\x00u\x00t\x00h\x00o\x00r\x00A\x00n\x00n\x00o\x00t\x00a\x00t\x00i\x00o\x00n\x00,\x00 \x00.\x00K\x00B\x00A\x00u\x00t\x00h\x00o\x00r\x00A\x00n\x00n\x00o\x00t\x00a\x00t\x00i\x00o\x00n\x00C\x00o\x00n\x00t\x00i\x00n\x00u\x00e\x00d\x00 \x00{\x00 \x00b\x00a\x00c\x00k\x00g\x00r\x00o\x00u\x00n\x00d\x00-\x00c\x00o\x00l\x00o\x00r\x00:\x00 \x00t\x00r\x00a\x00n\x00s\x00p\x00a\x00r\x00e\x00n\x00t\x00 \x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00 \x00t\x00e\x00x\x00t\x00-\x00d\x00e\x00c\x00o\x00r\x00a\x00t\x00i\x00o\x00n\x00:\x00 \x00n\x00o\x00n\x00e\x00 \x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00 \x00}\x00 \x00\t\x00`, `a\x00t\x00i\x00o\x00n\x00C\x00o\x00n\x00t\x00i\x00n\x00u\x00e\x00d\x00{\x00b\x00a\x00c\x00k\x00g\x00r\x00o\x00u\x00n\x00d\x00-\x00c\x00o\x00l\x00o\x00r\x00:\x00t\x00r\x00a\x00n\x00s\x00p\x00a\x00r\x00e\x00n\x00t\x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00t\x00e\x00x\x00t\x00-\x00d\x00e\x00c\x00o\x00r\x00a\x00t\x00i\x00o\x00n\x00:\x00n\x00o\x00n\x00e\x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00}\x00.\x00K\x00B\x00S\x00t\x00a\x00c\x00k\x00K\x00e\x00y\x00w\x00o\x00r\x00d\x00[\x00w\x00r\x00i\x00t\x00i\x00n\x00g\x00M\x00o\x00d\x00e\x00=\x00"\x00h\x00o\x00r\x00i\x00z\x00o\x00n\x00t\x00a\x00l\x00-\x00t\x00b\x00"\x00]\x00 \x00`
#
replace_string = DB4802, `.\x00K\x00B\x00S\x00t\x00a\x00c\x00k\x00K\x00e\x00y\x00w\x00o\x00r\x00d\x00[\x00w\x00r\x00i\x00t\x00i\x00n\x00g\x00M\x00o\x00d\x00e\x00=\x00"\x00h\x00o\x00r\x00i\x00z\x00o\x00n\x00t\x00a\x00l\x00-\x00t\x00b\x00"\x00]\x00 \x00a\x00 \x00{\x00 \x00b\x00o\x00r\x00d\x00e\x00r\x00-\x00b\x00o\x00t\x00t\x00o\x00m\x00:\x00 \x001\x00p\x00x\x00 \x00s\x00o\x00l\x00i\x00d\x00 \x00b\x00l\x00a\x00c\x00k\x00 \x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00 \x00}\x00 \x00\t\x00`, `a\x00{\x00b\x00o\x00r\x00d\x00e\x00r\x00-\x00b\x00o\x00t\x00t\x00o\x00m\x00:\x001\x00p\x00x\x00 \x00s\x00o\x00l\x00i\x00d\x00 \x00b\x00l\x00a\x00c\x00k\x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00}\x00 \x00.\x00K\x00B\x00A\x00u\x00t\x00h\x00o\x00r\x00A\x00n\x00n\x00o\x00t\x00a\x00t\x00i\x00o\x00n\x00[\x00w\x00r\x00i\x00t\x00i\x00n\x00g\x00M\x00o\x00d\x00e\x00=\x00"\x00h\x00o\x00r\x00i\x00z\x00o\x00n\x00t\x00a\x00l\x00-\x00t\x00b\x00"\x00]\x00,\x00.\x00K\x00`
#
replace_string = DB48C0, `.\x00K\x00B\x00A\x00u\x00t\x00h\x00o\x00r\x00A\x00n\x00n\x00o\x00t\x00a\x00t\x00i\x00o\x00n\x00[\x00w\x00r\x00i\x00t\x00i\x00n\x00g\x00M\x00o\x00d\x00e\x00=\x00"\x00h\x00o\x00r\x00i\x00z\x00o\x00n\x00t\x00a\x00l\x00-\x00t\x00b\x00"\x00]\x00,\x00 \x00.\x00K\x00B\x00A\x00u\x00t\x00h\x00o\x00r\x00A\x00n\x00n\x00o\x00t\x00a\x00t\x00i\x00o\x00n\x00C\x00o\x00n\x00t\x00i\x00n\x00u\x00e\x00d\x00[\x00w\x00r\x00i\x00t\x00i\x00n\x00g\x00M\x00o\x00d\x00e\x00=\x00"\x00h\x00o\x00r\x00i\x00z\x00o\x00n\x00t\x00a\x00l\x00-\x00t\x00b\x00"\x00]\x00 \x00{\x00 \x00b\x00o\x00r\x00d\x00e\x00r\x00-\x00b\x00o\x00t\x00t\x00o\x00m\x00:\x00 \x002\x00p\x00x\x00 \x00d\x00o\x00t\x00t\x00e\x00d\x00 \x00b\x00l\x00a\x00c\x00k\x00 \x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00 \x00}\x00 \x00\t\x00`, `B\x00A\x00u\x00t\x00h\x00o\x00r\x00A\x00n\x00n\x00o\x00t\x00a\x00t\x00i\x00o\x00n\x00C\x00o\x00n\x00t\x00i\x00n\x00u\x00e\x00d\x00[\x00w\x00r\x00i\x00t\x00i\x00n\x00g\x00M\x00o\x00d\x00e\x00=\x00"\x00h\x00o\x00r\x00i\x00z\x00o\x00n\x00t\x00a\x00l\x00-\x00t\x00b\x00"\x00]\x00{\x00b\x00o\x00r\x00d\x00e\x00r\x00-\x00b\x00o\x00t\x00t\x00o\x00m\x00:\x002\x00p\x00x\x00 \x00d\x00o\x00t\x00t\x00e\x00d\x00 \x00b\x00l\x00a\x00c\x00k\x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00}\x00.\x00K\x00B\x00A\x00n\x00n\x00o\x00t\x00a\x00t\x00i\x00o\x00n\x00[\x00w\x00r\x00i\x00t\x00i\x00n\x00g\x00M\x00o\x00d\x00e\x00=\x00"\x00h\x00o\x00r\x00i\x00z\x00o\x00n\x00t\x00a\x00l\x00-\x00t\x00b\x00"\x00]\x00,\x00.\x00K\x00B\x00A\x00n\x00n\x00o\x00t\x00a\x00t\x00i\x00o\x00n\x00C\x00o\x00n\x00`
#
replace_string = DB49FA, `.\x00K\x00B\x00A\x00n\x00n\x00o\x00t\x00a\x00t\x00i\x00o\x00n\x00[\x00w\x00r\x00i\x00t\x00i\x00n\x00g\x00M\x00o\x00d\x00e\x00=\x00"\x00h\x00o\x00r\x00i\x00z\x00o\x00n\x00t\x00a\x00l\x00-\x00t\x00b\x00"\x00]\x00,\x00 \x00.\x00K\x00B\x00A\x00n\x00n\x00o\x00t\x00a\x00t\x00i\x00o\x00n\x00C\x00o\x00n\x00t\x00i\x00n\x00u\x00e\x00d\x00[\x00w\x00r\x00i\x00t\x00i\x00n\x00g\x00M\x00o\x00d\x00e\x00=\x00"\x00h\x00o\x00r\x00i\x00z\x00o\x00n\x00t\x00a\x00l\x00-\x00t\x00b\x00"\x00]\x00 \x00{\x00 \x00b\x00o\x00r\x00d\x00e\x00r\x00-\x00b\x00o\x00t\x00t\x00o\x00m\x00:\x00 \x002\x00p\x00x\x00 \x00s\x00o\x00l\x00i\x00d\x00 \x00b\x00l\x00a\x00c\x00k\x00 \x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00 \x00}\x00 \x00\t\x00`, `t\x00i\x00n\x00u\x00e\x00d\x00[\x00w\x00r\x00i\x00t\x00i\x00n\x00g\x00M\x00o\x00d\x00e\x00=\x00"\x00h\x00o\x00r\x00i\x00z\x00o\x00n\x00t\x00a\x00l\x00-\x00t\x00b\x00"\x00]\x00{\x00b\x00o\x00r\x00d\x00e\x00r\x00-\x00b\x00o\x00t\x00t\x00o\x00m\x00:\x002\x00p\x00x\x00 \x00s\x00o\x00l\x00i\x00d\x00 \x00b\x00l\x00a\x00c\x00k\x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00}\x00.\x00K\x00B\x00S\x00t\x00a\x00c\x00k\x00K\x00e\x00y\x00w\x00o\x00r\x00d\x00[\x00w\x00r\x00i\x00t\x00i\x00n\x00g\x00M\x00o\x00d\x00e\x00=\x00"\x00v\x00e\x00r\x00t\x00i\x00c\x00a\x00l\x00-\x00r\x00l\x00"\x00]\x00 \x00a\x00{\x00b\x00o\x00r\x00d\x00e\x00r\x00-\x00r\x00i\x00g\x00h\x00t\x00:\x001\x00p\x00x\x00 \x00s\x00o\x00l\x00i\x00d\x00 \x00`
#
replace_string = DB4B1A, `.\x00K\x00B\x00S\x00t\x00a\x00c\x00k\x00K\x00e\x00y\x00w\x00o\x00r\x00d\x00[\x00w\x00r\x00i\x00t\x00i\x00n\x00g\x00M\x00o\x00d\x00e\x00=\x00"\x00v\x00e\x00r\x00t\x00i\x00c\x00a\x00l\x00-\x00r\x00l\x00"\x00]\x00 \x00a\x00 \x00{\x00 \x00b\x00o\x00r\x00d\x00e\x00r\x00-\x00r\x00i\x00g\x00h\x00t\x00:\x00 \x001\x00p\x00x\x00 \x00s\x00o\x00l\x00i\x00d\x00 \x00b\x00l\x00a\x00c\x00k\x00 \x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00 \x00}\x00 \x00\t\x00`, `b\x00l\x00a\x00c\x00k\x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00}\x00b\x00o\x00d\x00y\x00 \x00p\x00,\x00b\x00o\x00d\x00y\x00 \x00d\x00i\x00v\x00{\x00p\x00a\x00d\x00d\x00i\x00n\x00g\x00:\x000\x00.\x001\x00e\x00m\x00 \x000\x00.\x001\x00e\x00m\x00 \x000\x00.\x001\x00e\x00m\x00 \x000\x00.\x001\x00e\x00m\x00 \x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00}\x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00`
#
# Fix typo in annotations styles: KBAuthorAnnotation --> .KBAuthorAnnotation
replace_string = DB4554, `\x20`, `.`
#
# Replacement values: padding size, 1 = 0.1em (top,right,bottom,left)
replace_string = DB4B6E, `1`, `1`
replace_string = DB4B7A, `1`, `1`
replace_string = DB4B86, `1`, `1`
replace_string = DB4B92, `1`, `1`
#
</Patch>

Last edited by GeoffR; 12-17-2014 at 03:24 AM. Reason: added patch
GeoffR is offline   Reply With Quote
Old 12-17-2014, 04:55 AM   #72
scoky
Connoisseur
scoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy blue
 
Posts: 62
Karma: 13112
Join Date: Feb 2013
Device: Kindle Paperwhite; KOBO AURA HD
Quote:
Originally Posted by GeoffR View Post
Update for the `Fix kepub side bearing font cut off bug` patchs in post #57. I've added options to the patches to allow for vertical language books:

For the "synced kepubs only" patch there are three options: left/right padding, top/bottom padding, or all four sides (default). The default option should work okay with both horizontal and vertical language kepubs.

For the "all kepubs (synced and sideloaded)" patch there are only two options: left/right padding, or top/bottom padding. This means you need to choose whether to fix the bug for horizontal language kepubs or vertical language kepubs, there is no option that works with both.

The problem with the sideloaded kepubs is that adding padding on all four sides will cause major side effects such as increased space between paragraphs. It would be possible to add padding to left/right or top/bottom depending on the text writing direction of the current book if there was enough space in the stylesheet, but there is just not enough room.



I can create the patch like that if you want, but I think it will probably have big effects on the layout. I think what really needs to be done is something like this, once for each writing direction:
Code:
body[writingMode="horizontal-tb"] p, body[writingMode="horizontal-tb"] div {padding-left:0.1em!important;padding-right:0.1em!important}
Here is a patch for all kepubs that adds padding to all four sides. Let me know if it is worthwhile adding this as an option for sideloaded kepubs, or does it just have too many side effects on layout:
Spoiler:
Code:
<Patch>
patch_name = `Fix kepub side bearing font cut-off bug (all kepubs, padding all sides)`
patch_enable = `yes`
#
# This patch adds the following line to the built-in kepub stylesheet:
#
#   body p,body div{padding:0.1em 0.1em 0.1em 0.1em!important}
#
replace_string = DB4470, `.\x00K\x00B\x00H\x00i\x00g\x00h\x00l\x00i\x00g\x00h\x00t\x00i\x00n\x00g\x00 \x00{\x00 \x00b\x00a\x00c\x00k\x00g\x00r\x00o\x00u\x00n\x00d\x00-\x00c\x00o\x00l\x00o\x00r\x00:\x00 \x00#\x00C\x006\x00C\x006\x00C\x006\x00 \x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00 \x00}\x00 \x00\t\x00`, `.\x00K\x00B\x00H\x00i\x00g\x00h\x00l\x00i\x00g\x00h\x00t\x00i\x00n\x00g\x00{\x00b\x00a\x00c\x00k\x00g\x00r\x00o\x00u\x00n\x00d\x00-\x00c\x00o\x00l\x00o\x00r\x00:\x00#\x00C\x006\x00C\x006\x00C\x006\x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00}\x00.\x00K\x00B\x00S\x00t\x00a\x00c\x00`
#
replace_string = DB44E6, `.\x00K\x00B\x00S\x00t\x00a\x00c\x00k\x00K\x00e\x00y\x00w\x00o\x00r\x00d\x00,\x00 \x00.\x00K\x00B\x00S\x00e\x00a\x00r\x00c\x00h\x00R\x00e\x00s\x00u\x00l\x00t\x00,\x00 \x00.\x00K\x00B\x00A\x00n\x00n\x00o\x00t\x00a\x00t\x00i\x00o\x00n\x00,\x00 \x00.\x00K\x00B\x00H\x00i\x00g\x00h\x00l\x00i\x00g\x00h\x00t\x00i\x00n\x00g\x00 \x00,\x00 \x00K\x00B\x00A\x00u\x00t\x00h\x00o\x00r\x00A\x00n\x00n\x00o\x00t\x00a\x00t\x00i\x00o\x00n\x00{\x00 \x00f\x00o\x00n\x00t\x00-\x00s\x00i\x00z\x00e\x00:\x00 \x001\x000\x000\x00%\x00 \x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00 \x00-\x00w\x00e\x00b\x00k\x00i\x00t\x00-\x00t\x00e\x00x\x00t\x00-\x00c\x00o\x00m\x00b\x00i\x00n\x00e\x00:\x00 \x00i\x00n\x00h\x00e\x00r\x00i\x00t\x00 \x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00 \x00}\x00 \x00\t\x00`, `k\x00K\x00e\x00y\x00w\x00o\x00r\x00d\x00,\x00.\x00K\x00B\x00S\x00e\x00a\x00r\x00c\x00h\x00R\x00e\x00s\x00u\x00l\x00t\x00,\x00.\x00K\x00B\x00A\x00n\x00n\x00o\x00t\x00a\x00t\x00i\x00o\x00n\x00,\x00.\x00K\x00B\x00H\x00i\x00g\x00h\x00l\x00i\x00g\x00h\x00t\x00i\x00n\x00g\x00,\x00 \x00K\x00B\x00A\x00u\x00t\x00h\x00o\x00r\x00A\x00n\x00n\x00o\x00t\x00a\x00t\x00i\x00o\x00n\x00{\x00f\x00o\x00n\x00t\x00-\x00s\x00i\x00z\x00e\x00:\x001\x000\x000\x00%\x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00-\x00w\x00e\x00b\x00k\x00i\x00t\x00-\x00t\x00e\x00x\x00t\x00-\x00c\x00o\x00m\x00b\x00i\x00n\x00e\x00:\x00i\x00n\x00h\x00e\x00r\x00i\x00t\x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00}\x00.\x00K\x00B\x00S\x00e\x00a\x00r\x00c\x00h\x00R\x00e\x00s\x00u\x00l\x00t\x00{\x00b\x00a\x00c\x00k\x00`
#
replace_string = DB4626, `.\x00K\x00B\x00S\x00e\x00a\x00r\x00c\x00h\x00R\x00e\x00s\x00u\x00l\x00t\x00 \x00{\x00 \x00b\x00a\x00c\x00k\x00g\x00r\x00o\x00u\x00n\x00d\x00-\x00c\x00o\x00l\x00o\x00r\x00:\x00 \x00#\x00C\x006\x00C\x006\x00C\x006\x00 \x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00 \x00}\x00 \x00\t\x00`, `g\x00r\x00o\x00u\x00n\x00d\x00-\x00c\x00o\x00l\x00o\x00r\x00:\x00#\x00C\x006\x00C\x006\x00C\x006\x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00}\x00.\x00K\x00B\x00S\x00t\x00a\x00c\x00k\x00K\x00e\x00y\x00w\x00o\x00r\x00d\x00 \x00a\x00{\x00c\x00o\x00l\x00o\x00r\x00:\x00b\x00l\x00a\x00`
#
replace_string = DB469C, `.\x00K\x00B\x00S\x00t\x00a\x00c\x00k\x00K\x00e\x00y\x00w\x00o\x00r\x00d\x00 \x00a\x00 \x00{\x00 \x00c\x00o\x00l\x00o\x00r\x00:\x00 \x00b\x00l\x00a\x00c\x00k\x00 \x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00 \x00}\x00 \x00\t\x00`, `c\x00k\x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00}\x00.\x00K\x00B\x00A\x00u\x00t\x00h\x00o\x00r\x00A\x00n\x00n\x00o\x00t\x00a\x00t\x00i\x00o\x00n\x00,\x00.\x00K\x00B\x00A\x00u\x00t\x00h\x00o\x00r\x00A\x00n\x00n\x00o\x00t\x00`
#
replace_string = DB46FC, `.\x00K\x00B\x00A\x00u\x00t\x00h\x00o\x00r\x00A\x00n\x00n\x00o\x00t\x00a\x00t\x00i\x00o\x00n\x00,\x00 \x00.\x00K\x00B\x00A\x00u\x00t\x00h\x00o\x00r\x00A\x00n\x00n\x00o\x00t\x00a\x00t\x00i\x00o\x00n\x00C\x00o\x00n\x00t\x00i\x00n\x00u\x00e\x00d\x00 \x00{\x00 \x00b\x00a\x00c\x00k\x00g\x00r\x00o\x00u\x00n\x00d\x00-\x00c\x00o\x00l\x00o\x00r\x00:\x00 \x00t\x00r\x00a\x00n\x00s\x00p\x00a\x00r\x00e\x00n\x00t\x00 \x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00 \x00t\x00e\x00x\x00t\x00-\x00d\x00e\x00c\x00o\x00r\x00a\x00t\x00i\x00o\x00n\x00:\x00 \x00n\x00o\x00n\x00e\x00 \x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00 \x00}\x00 \x00\t\x00`, `a\x00t\x00i\x00o\x00n\x00C\x00o\x00n\x00t\x00i\x00n\x00u\x00e\x00d\x00{\x00b\x00a\x00c\x00k\x00g\x00r\x00o\x00u\x00n\x00d\x00-\x00c\x00o\x00l\x00o\x00r\x00:\x00t\x00r\x00a\x00n\x00s\x00p\x00a\x00r\x00e\x00n\x00t\x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00t\x00e\x00x\x00t\x00-\x00d\x00e\x00c\x00o\x00r\x00a\x00t\x00i\x00o\x00n\x00:\x00n\x00o\x00n\x00e\x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00}\x00.\x00K\x00B\x00S\x00t\x00a\x00c\x00k\x00K\x00e\x00y\x00w\x00o\x00r\x00d\x00[\x00w\x00r\x00i\x00t\x00i\x00n\x00g\x00M\x00o\x00d\x00e\x00=\x00"\x00h\x00o\x00r\x00i\x00z\x00o\x00n\x00t\x00a\x00l\x00-\x00t\x00b\x00"\x00]\x00 \x00`
#
replace_string = DB4802, `.\x00K\x00B\x00S\x00t\x00a\x00c\x00k\x00K\x00e\x00y\x00w\x00o\x00r\x00d\x00[\x00w\x00r\x00i\x00t\x00i\x00n\x00g\x00M\x00o\x00d\x00e\x00=\x00"\x00h\x00o\x00r\x00i\x00z\x00o\x00n\x00t\x00a\x00l\x00-\x00t\x00b\x00"\x00]\x00 \x00a\x00 \x00{\x00 \x00b\x00o\x00r\x00d\x00e\x00r\x00-\x00b\x00o\x00t\x00t\x00o\x00m\x00:\x00 \x001\x00p\x00x\x00 \x00s\x00o\x00l\x00i\x00d\x00 \x00b\x00l\x00a\x00c\x00k\x00 \x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00 \x00}\x00 \x00\t\x00`, `a\x00{\x00b\x00o\x00r\x00d\x00e\x00r\x00-\x00b\x00o\x00t\x00t\x00o\x00m\x00:\x001\x00p\x00x\x00 \x00s\x00o\x00l\x00i\x00d\x00 \x00b\x00l\x00a\x00c\x00k\x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00}\x00 \x00.\x00K\x00B\x00A\x00u\x00t\x00h\x00o\x00r\x00A\x00n\x00n\x00o\x00t\x00a\x00t\x00i\x00o\x00n\x00[\x00w\x00r\x00i\x00t\x00i\x00n\x00g\x00M\x00o\x00d\x00e\x00=\x00"\x00h\x00o\x00r\x00i\x00z\x00o\x00n\x00t\x00a\x00l\x00-\x00t\x00b\x00"\x00]\x00,\x00.\x00K\x00`
#
replace_string = DB48C0, `.\x00K\x00B\x00A\x00u\x00t\x00h\x00o\x00r\x00A\x00n\x00n\x00o\x00t\x00a\x00t\x00i\x00o\x00n\x00[\x00w\x00r\x00i\x00t\x00i\x00n\x00g\x00M\x00o\x00d\x00e\x00=\x00"\x00h\x00o\x00r\x00i\x00z\x00o\x00n\x00t\x00a\x00l\x00-\x00t\x00b\x00"\x00]\x00,\x00 \x00.\x00K\x00B\x00A\x00u\x00t\x00h\x00o\x00r\x00A\x00n\x00n\x00o\x00t\x00a\x00t\x00i\x00o\x00n\x00C\x00o\x00n\x00t\x00i\x00n\x00u\x00e\x00d\x00[\x00w\x00r\x00i\x00t\x00i\x00n\x00g\x00M\x00o\x00d\x00e\x00=\x00"\x00h\x00o\x00r\x00i\x00z\x00o\x00n\x00t\x00a\x00l\x00-\x00t\x00b\x00"\x00]\x00 \x00{\x00 \x00b\x00o\x00r\x00d\x00e\x00r\x00-\x00b\x00o\x00t\x00t\x00o\x00m\x00:\x00 \x002\x00p\x00x\x00 \x00d\x00o\x00t\x00t\x00e\x00d\x00 \x00b\x00l\x00a\x00c\x00k\x00 \x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00 \x00}\x00 \x00\t\x00`, `B\x00A\x00u\x00t\x00h\x00o\x00r\x00A\x00n\x00n\x00o\x00t\x00a\x00t\x00i\x00o\x00n\x00C\x00o\x00n\x00t\x00i\x00n\x00u\x00e\x00d\x00[\x00w\x00r\x00i\x00t\x00i\x00n\x00g\x00M\x00o\x00d\x00e\x00=\x00"\x00h\x00o\x00r\x00i\x00z\x00o\x00n\x00t\x00a\x00l\x00-\x00t\x00b\x00"\x00]\x00{\x00b\x00o\x00r\x00d\x00e\x00r\x00-\x00b\x00o\x00t\x00t\x00o\x00m\x00:\x002\x00p\x00x\x00 \x00d\x00o\x00t\x00t\x00e\x00d\x00 \x00b\x00l\x00a\x00c\x00k\x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00}\x00.\x00K\x00B\x00A\x00n\x00n\x00o\x00t\x00a\x00t\x00i\x00o\x00n\x00[\x00w\x00r\x00i\x00t\x00i\x00n\x00g\x00M\x00o\x00d\x00e\x00=\x00"\x00h\x00o\x00r\x00i\x00z\x00o\x00n\x00t\x00a\x00l\x00-\x00t\x00b\x00"\x00]\x00,\x00.\x00K\x00B\x00A\x00n\x00n\x00o\x00t\x00a\x00t\x00i\x00o\x00n\x00C\x00o\x00n\x00`
#
replace_string = DB49FA, `.\x00K\x00B\x00A\x00n\x00n\x00o\x00t\x00a\x00t\x00i\x00o\x00n\x00[\x00w\x00r\x00i\x00t\x00i\x00n\x00g\x00M\x00o\x00d\x00e\x00=\x00"\x00h\x00o\x00r\x00i\x00z\x00o\x00n\x00t\x00a\x00l\x00-\x00t\x00b\x00"\x00]\x00,\x00 \x00.\x00K\x00B\x00A\x00n\x00n\x00o\x00t\x00a\x00t\x00i\x00o\x00n\x00C\x00o\x00n\x00t\x00i\x00n\x00u\x00e\x00d\x00[\x00w\x00r\x00i\x00t\x00i\x00n\x00g\x00M\x00o\x00d\x00e\x00=\x00"\x00h\x00o\x00r\x00i\x00z\x00o\x00n\x00t\x00a\x00l\x00-\x00t\x00b\x00"\x00]\x00 \x00{\x00 \x00b\x00o\x00r\x00d\x00e\x00r\x00-\x00b\x00o\x00t\x00t\x00o\x00m\x00:\x00 \x002\x00p\x00x\x00 \x00s\x00o\x00l\x00i\x00d\x00 \x00b\x00l\x00a\x00c\x00k\x00 \x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00 \x00}\x00 \x00\t\x00`, `t\x00i\x00n\x00u\x00e\x00d\x00[\x00w\x00r\x00i\x00t\x00i\x00n\x00g\x00M\x00o\x00d\x00e\x00=\x00"\x00h\x00o\x00r\x00i\x00z\x00o\x00n\x00t\x00a\x00l\x00-\x00t\x00b\x00"\x00]\x00{\x00b\x00o\x00r\x00d\x00e\x00r\x00-\x00b\x00o\x00t\x00t\x00o\x00m\x00:\x002\x00p\x00x\x00 \x00s\x00o\x00l\x00i\x00d\x00 \x00b\x00l\x00a\x00c\x00k\x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00}\x00.\x00K\x00B\x00S\x00t\x00a\x00c\x00k\x00K\x00e\x00y\x00w\x00o\x00r\x00d\x00[\x00w\x00r\x00i\x00t\x00i\x00n\x00g\x00M\x00o\x00d\x00e\x00=\x00"\x00v\x00e\x00r\x00t\x00i\x00c\x00a\x00l\x00-\x00r\x00l\x00"\x00]\x00 \x00a\x00{\x00b\x00o\x00r\x00d\x00e\x00r\x00-\x00r\x00i\x00g\x00h\x00t\x00:\x001\x00p\x00x\x00 \x00s\x00o\x00l\x00i\x00d\x00 \x00`
#
replace_string = DB4B1A, `.\x00K\x00B\x00S\x00t\x00a\x00c\x00k\x00K\x00e\x00y\x00w\x00o\x00r\x00d\x00[\x00w\x00r\x00i\x00t\x00i\x00n\x00g\x00M\x00o\x00d\x00e\x00=\x00"\x00v\x00e\x00r\x00t\x00i\x00c\x00a\x00l\x00-\x00r\x00l\x00"\x00]\x00 \x00a\x00 \x00{\x00 \x00b\x00o\x00r\x00d\x00e\x00r\x00-\x00r\x00i\x00g\x00h\x00t\x00:\x00 \x001\x00p\x00x\x00 \x00s\x00o\x00l\x00i\x00d\x00 \x00b\x00l\x00a\x00c\x00k\x00 \x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00 \x00}\x00 \x00\t\x00`, `b\x00l\x00a\x00c\x00k\x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00}\x00b\x00o\x00d\x00y\x00 \x00p\x00,\x00b\x00o\x00d\x00y\x00 \x00d\x00i\x00v\x00{\x00p\x00a\x00d\x00d\x00i\x00n\x00g\x00:\x000\x00.\x001\x00e\x00m\x00 \x000\x00.\x001\x00e\x00m\x00 \x000\x00.\x001\x00e\x00m\x00 \x000\x00.\x001\x00e\x00m\x00 \x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00}\x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00`
#
# Fix typo in annotations styles: KBAuthorAnnotation --> .KBAuthorAnnotation
replace_string = DB4554, `\x20`, `.`
#
# Replacement values: padding size, 1 = 0.1em (top,right,bottom,left)
replace_string = DB4B6E, `1`, `1`
replace_string = DB4B7A, `1`, `1`
replace_string = DB4B86, `1`, `1`
replace_string = DB4B92, `1`, `1`
#
</Patch>
I have tested this four paddings patch and it works well for both horizontal and vertical text. For paragraph gap, it seems a little bigger, but I think it's acceptable. So I think it may be an option for someone like me needs it. Thanks again
scoky is offline   Reply With Quote
Old 12-17-2014, 11:59 AM   #73
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
I'd use "body>p,body>div" rather than "body p,body div", or nested elements will get increased padding...
Jellby is offline   Reply With Quote
Old 12-17-2014, 12:40 PM   #74
npr
Zealot
npr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five words
 
Posts: 103
Karma: 37418
Join Date: Jan 2013
Device: Kobo Glo, Aura, H2OE2, Libra 2
Tried the third patch and it does stop the tips of "f's" being cut off on both my side loaded and kobo loaded kepubs.

I also tried it with the top padding set to 2 and bottom padding set to 0 in the hope it would correct my pet complaint of marks at the bottom of the page with corresponding bit missing from the top of the text on the next page.
On most pages there was no improvement, but on pages which started with a new paragraph then that page did not have bit's missing from the top of the text. Also the previous page did not show corresponding marks along the bottom. I suspect this method can fix my pet issue of marks on the bottom of the page if only the patch can be made to add padding to a page in place of just to a paragraph.
Any chance GeoffR ? You've done a great job so far.
npr is offline   Reply With Quote
Old 12-17-2014, 12:43 PM   #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
Quote:
Originally Posted by Jellby View Post
I'd use "body>p,body>div" rather than "body p,body div", or nested elements will get increased padding...
Thanks! I've updated the `all kepubs` patches in post #57 with this change.


BTW, I have been distinguishing between synced and sideloaded kepubs, but really the difference is between Kobo-created kepubs and other kepubs. If you were to sideload a Kobo-created kepub (say by syncing it to the desktop, removing DRM, and sideloading it to the ereader), then it would work just the same as a synced kepub.
GeoffR is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Instructions for patching firmware 3.11.0 GeoffR Kobo Developer's Corner 226 06-01-2015 05:32 AM
Instructions for patching firmware 3.2.0 DNSB Kobo Developer's Corner 66 12-05-2014 07:28 AM
Instructions for patching firmware 3.8.0 GeoffR Kobo Developer's Corner 92 10-22-2014 07:22 AM
Instructions for patching firmware 3.3.x, 3.4.x, 3.5.x GeoffR Kobo Developer's Corner 285 08-27-2014 10:06 AM
Instructions for patching firmware 3.1.1 GeoffR Kobo Developer's Corner 64 04-18-2014 01:23 PM


All times are GMT -4. The time now is 02:44 AM.


MobileRead.com is a privately owned, operated and funded community.