Hello,
I am experiencing a problem with side-loaded fonts on Kobo Libra H2O (4.25.15875). The text gets cut off at the bottom of the page when I am reading KePub (also ePub) in vertical layout (Chinese).
I crawled up a bit here and found the solution to fix it when side-loading KePub via Calibre with Kobo Touch Extended Drive by adding the following to kobo_extra.css:
Code:
body {
margin: 0 !important;
padding: 0 !important;
}
body>div {
/*padding-top: 0.2em !important;*/ /* Seems to be unnecessary, as the problem only exists at the bottom part in vertical text */
padding-bottom: 0.3em !important; /* Changed from 0.2em -> 0.3 em for better balanced spacing */
}
It works well for side-loaded KePub.
I also want to get it work with synched KePub books, I also tried patching the Nickel firmware with the code I found on a pgaskin patch
here back for 4.16.13162. I adapted it a bit for the padding-bottom also as 0.3em have it added to the bottom of libnickel.so.1.0.0.yaml of the kobopatch_4.25.15875. Then I ran the patch to my Libra H2O.
Code:
Fix three KePub fullScreenReading bugs:
- Enabled: yes
- Description: See https://www.mobileread.com/forums/showpost.php?p=3113460&postcount=16
- FindReplaceString:
Find: "img { display: block; margin-left: auto !important; margin-right: auto !important; width: auto !important; height: auto !important; }"
Replace: "body { margin: 0 !important; padding: 0 !important; } body>div { padding-left: 0.2em !important; padding-right: 0.3em !important; }"
# CUSTOM: Changed padding-right from 0.2em to 0.3em.
#
MustMatchLength: yes
# Optional replacement values below (all relate to the second problem above):
# set the amount of added padding: `1` = 0.1em, `2` = 0.2em, etc.
# 0.1em is enough for many fonts, but some (such as Georgia) need 0.2em.
- ReplaceString: {Offset: 0x52, Find: "2", Replace: "2"}
- ReplaceString: {Offset: 0x74, Find: "2", Replace: "3"}
# CUSTOM: Changed to 3 for 0.3em for padding-bottom.
#
# The default patch settings are suitable for horizontal languages only.
# Uncomment the following two replace_string lines for vertical languages only:
- ReplaceString: {Offset: 0x4A, Find: "left:", Replace: "top:\x20"}
- ReplaceString: {Offset: 0x6A, Find: "right: ", Replace: "bottom:"}
However, it does not seem to be working…

(See screenshots for comparison between the default and two side-loaded fonts.)
Is there a way to fix the custom, side-loaded font being cut off issue with synchronised KePub on Kobo?
Thanks a lot.