|
|||||||
![]() |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Oct 2020
Device: Kobo Libra H2O
|
Text with side-loaded font cut off at the bottom in vertical layout (synched KePub)
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 */
}
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:"}
(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. Last edited by kch; 01-17-2021 at 08:33 PM. |
|
|
|
![]() |
| Tags |
| cut off, font, kepub, vertical layout |
| Thread Tools | Search this Thread |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Side-loaded Font Weight Patch | dzhmartin | Kobo Developer's Corner | 3 | 03-02-2019 02:01 AM |
| Top and bottom margins with side loaded EPUB | chromeuser | Kobo Reader | 16 | 10-21-2016 04:41 AM |
| Text cut off on right hand side | stevmnk | Kindle Formats | 1 | 04-29-2013 05:38 PM |
| How to specifiy vertical text layout (e.g. Japanese) | totsubo | Sigil | 7 | 04-13-2013 02:01 AM |
| Since 1.9.10, text slightly cut off on very bottom line | danskmacabre | Kobo Reader | 33 | 01-13-2012 05:25 AM |