![]() |
#1 |
Connoisseur
![]() Posts: 79
Karma: 10
Join Date: Jun 2011
Device: Nook STR, Kobo Aura H2O, Kobo Libra 2
|
Several kobopatch config questions
Hello! I'm new to patching and would like to try. I've read the readme and the yaml config docs but I have several questions regarding some of the configurations. I would appreciate any replies I can get.
![]()
Additionally, I'm experiencing an odd issue where the right margin is visually smaller than the left margin. After increasing/decreasing the margins on-device, it looks like the right and left sides scale at a slightly different rate? I've enabled "Custom kepub default margins" and have the following in my kobo_extra.css (which I set KoboTouchExtended to use when generating kepubs): Code:
@page {margin: 8pt 0 0 0} div, p {widows:1; orphans:1;} (Maybe my screen is not evenly set in the device? ![]() Thank you! Last edited by Antioch; 01-29-2022 at 08:19 AM. |
![]() |
![]() |
![]() |
#2 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,434
Karma: 239219453
Join Date: Jan 2014
Location: Estonia
Device: Kobo Sage & Libra 2
|
1. They're not mutually exclusive. I use both of them.
Sorry, I don't use the rest in your list, so can't answer those. |
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,251
Karma: 16539642
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
|
Quote:
However, the version for 4.31.19086 works quite happily as-is in 4.30.xxxxx because nothing relevant changed between 4.30 and 4.31 for this particular patch. You can copy the patch KePub stylesheet additions - optimizeLegibility from here (it's the last patch on that page). Paste it into your existing copy of libnickel.so.1.0.0.yaml before enabling it. |
|
![]() |
![]() |
![]() |
#4 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,251
Karma: 16539642
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
|
Quote:
Are you sure it's not related to a specific book which specifies unequal L/R margins in its body{...} CSS? If you're using KoboTouchExtended to send your epubs to the Kobo as kepubs then you need to be aware that kepubs ignore all @page, widows, orphans CSS. You'll only see the effect of your kobo_extra.css (as posted above) for epubs which you used calibre to transfer as standard epubs, i.e. books sent using KoboTouchExtended with the box Enable Extended Kobo Features un-checked. |
|
![]() |
![]() |
![]() |
#5 | ||||
Connoisseur
![]() Posts: 79
Karma: 10
Join Date: Jun 2011
Device: Nook STR, Kobo Aura H2O, Kobo Libra 2
|
Quote:
![]() @Jackie_w, is it possible to only enable kerning and not ligatures? Quote:
Maybe my eyes/brain are playing tricks on me! However, with 0 margin on the device it really does look like the rightmost 1 or 2 pixels are cut off. Perhaps the screen isn't centered. Is there a way to add 1 or 2 pixel margin-right to all kepubs? Quote:
https://github.com/jgoguen/calibre-k...bitrary-styles Quote:
Code:
@page {margin: 8pt 0 0 0} div, p {widows:1; orphans:1;} |
||||
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Connoisseur
![]() Posts: 79
Karma: 10
Join Date: Jun 2011
Device: Nook STR, Kobo Aura H2O, Kobo Libra 2
|
I'm curious if anyone knows what is going on with the word spacing in these examples? Specifically looking at the first line of the second paragraph.
The screenshots are as follows: 1. KePub with patched firmware (excluding legibility patch) 2. ePub (same firmware as #1) 3. KePub with same firmware as #1 + legibility patch (Note: KePub was converted with KoboTouchExtended driver) Here are my firmware patch settings: Spoiler:
And here are the reader configs from "Kobo eReader.conf" for reference: Spoiler:
What I see going on here: A. Extra spacing between words in KePub causing words to be moved the next line compared to ePub. Perhaps due to a minor difference in margins impacting line width? B. With kerning (legibility patch) enabled there is extra spacing between letters in KePub compared to without kerning enabled. I expected the opposite: a reduction in spacing. C. Maybe line spacing is larger in KePub than ePub? Not sure, but not too concerned with this. Help is much appreciated! |
![]() |
![]() |
![]() |
#7 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,687
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
https://www.mobileread.com/forums/sh...d.php?t=259102 |
|
![]() |
![]() |
![]() |
#8 |
Connoisseur
![]() Posts: 79
Karma: 10
Join Date: Jun 2011
Device: Nook STR, Kobo Aura H2O, Kobo Libra 2
|
I did some I-have-no-idea-what-I'm-doing sleuthing and think I have figured out what is causing the word spacing discrepancies:
The fonts aren't set to exactly the same size in the kepub and epub renderers. That is, I don't think that the "unify font size" patch makes both sizes exactly the same? I zoomed in to the two screenshots and noticed that there is a slight shadow around the kepub's text (most discernable around the upper edges of 'T') which suggests to me that the font is scaled ever so slightly larger than the epub's thus causing "afterglow" to not fit on the same line. This might also have a very minute effect on C (line spacing), as well? Of course, the programmers know exactly what is going on with that patch and can let me know that my guess is wrong. ![]() (kepub on left, epub on right - zoomed 1000%) Last edited by Antioch; 01-30-2022 at 08:00 AM. |
![]() |
![]() |
![]() |
#9 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,251
Karma: 16539642
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
|
Quote:
Code:
text-rendering: optimizeLegibility |
|
![]() |
![]() |
![]() |
#10 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,251
Karma: 16539642
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
|
Quote:
![]() Given some of your kerning questions, I think it may be worth you reading the whole kepub vs. epub thread. It's only 3 pages of posts so shouldn't take too long. It's where the text-rendering: optimizeLegibility pros/cons were first discussed. |
|
![]() |
![]() |
![]() |
#11 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,687
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
I do appreciate all the help you and others give. |
|
![]() |
![]() |
![]() |
#12 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Keep in mind that both engines use *completely* different font renderers, so I don't expect a 1:1 pixel-perfect match, even for something "slightly" (he said ;p) more trivial as baseline and glyph blackbox handling to actually be technically feasible
![]() As a not-really-applicable-here, but highly interesting, and tangentially related read, see https://gankra.github.io/blah/text-hates-you/ ![]() Last edited by NiLuJe; 01-30-2022 at 05:53 PM. |
![]() |
![]() |
![]() |
#13 | |
Connoisseur
![]() Posts: 79
Karma: 10
Join Date: Jun 2011
Device: Nook STR, Kobo Aura H2O, Kobo Libra 2
|
Quote:
The only issue I really had with RMSDK was with page numbering. I strongly disliked that the displayed page numbers didn't match with page turns: I would often turn a page and the page number didn't increment. This made it impossible to estimate how much longer I had remaining in each chapter. Is it correct to assume that this isn't "fixable" by a patch? |
|
![]() |
![]() |
![]() |
#14 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 875
Karma: 2676800
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
|
Quote:
I'm one of the people who prefer that. It means I know exactly how long a book is, no matter the font size, margins, line spacing etc. As for the unify font size patch, there's no way to get it pixel perfect. My goal was to get it as close as possible, but the multipliers/divisors I have to work with can only be set in 0.25 increments. Also, as NiLuJe said, kebup and epubs use completely different font renderers. |
|
![]() |
![]() |
![]() |
#15 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 875
Karma: 2676800
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
|
Just something I've remembered with regards to margins in epub files.
Until recently, it was quite common for commercial epubs to contain RMSDK specific .xpgt stylesheets, which usually contained margin settings. Most other software - including Calibre - does not read these stylesheets. But Kobo ereaders do. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
kobopatch request thread | geek1011 | Kobo Developer's Corner | 1271 | 05-03-2025 09:08 AM |
kobopatch - An improved patching system | geek1011 | Kobo Developer's Corner | 391 | 12-28-2021 09:56 PM |
Libra Applied Kobopatch and I notice no changes | Nalco | Kobo Developer's Corner | 4 | 05-28-2021 08:39 PM |
kobopatch - A new (WIP) patching system | geek1011 | Kobo Developer's Corner | 93 | 05-27-2018 03:04 PM |