|
|||||||
![]() |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46
Karma: 113263
Join Date: Apr 2024
Location: Belgium
Device: Kobo Libra Color, Kobo Clara Color
|
Hi everyone.
I wanted to share my new mod here today, NickelTypeFix, which is a mod focused on improving typography and typesetting on Kobo devices' kepub renderer by fixing some bugs. For a while now, I've been frustrated that Kobo devices seem to have issues correctly rendering fonts, especially compared to KOReader. When pixel peeping, you could notice that sometimes (some) characters would, in fact, shift 1px up or down relative to where you'd expect to see them, leading to an "uneven" or even "wobbly" feeling with certain fonts if you looked carefully at the baseline of the text. Also, prior to today, you could add the following block to your `Kobo eReader.conf`, and tell the renderer to force proper ligatures etc. on, like this: Code:
[Reading] webkitTextRendering=optimizeLegibility - Justification breaks in some cases - Vertical CJK books totally break as some key characters are rotated Not to mention that sometimes, the kepub render seems to disregard your selected font when you reach a new chapter in the book you're reading. It's rare, but something I encountered before. I tracked all of these things down and made a mod that fixes all these issues. I think it's pretty much ready for release, so I wanted to share it here first. You can find the mod and some screenshots here: https://github.com/nicoverbruggen/NickelTypeFix There's some screenshots attached in the README on GitHub so you can see what's been fixed. This is a pretty niche mod, but especially the first fix makes font rendering so much better, especially if you use custom fonts. Individual parts of the mod can be turned off, too, so it's configurable. I've also done my best to make the mod as safe as possible. Been running this for a while now on my devices, and it's great. I hope you all find it helpful! |
|
|
|
|
|
#2 |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 84,178
Karma: 153715495
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Thank you for this.
Would you also be able to fix so it doesn't split the last line between two pages when the line height is small enough? Thanks. Last edited by JSWolf; 07-10-2026 at 08:44 AM. |
|
|
|
|
|
#3 |
|
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46
Karma: 113263
Join Date: Apr 2024
Location: Belgium
Device: Kobo Libra Color, Kobo Clara Color
|
|
|
|
|
|
|
#4 |
|
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 132
Karma: 67444
Join Date: Dec 2018
Device: Kobo Clara HD
|
Thank you for NickelTypeFix! I also use your NickelHome (and fonts) as well.
![]() I've noticed it with all typefaces. If you have the My 24 line spacing values kobopatch enabled, reducing the line spacing significantly should demonstrate the last line getting cut/split between pages. |
|
|
|
|
|
#5 |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 84,178
Karma: 153715495
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
I don't know if the problem is due to patching or not. But when I have the line height set small. The last line at the bottom of the screen (with widows and orphans set to 1), splits. So part of the line in there and the rest is at the top of the next page.
|
|
|
|
|
|
#6 |
|
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46
Karma: 113263
Join Date: Apr 2024
Location: Belgium
Device: Kobo Libra Color, Kobo Clara Color
|
Ah, I think I ran into that as well when I tried the 24 line spacing values patch... given that it's a patch it's not surprising it may result in some strange behaviour. Hmmm, I'll take a look when I have some more time next week!
Personally, I think your odds of fixing it are higher if you were to just mod your preferred fonts' metrics, so that at the minimum setting, the lines are closer together. It's what I already do with the font collection I maintain. I think at a certain multiplier that the patch introduces, the layout engine's math that shifts text just breaks. Worth looking into though, for sure. By the way, I got another fun mod idea earlier today that's actually bearing fruit with an experimental prototype at the moment: a mod that adds animated page turns, like Kindles have. I think it could become my second favorite Kobo mod if it works without issues, as it's a fun flourish I miss from my brief time with a Kindle. If I get that working I'll make another thread
|
|
|
|
|
|
#7 | |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 84,178
Karma: 153715495
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
If the page animation uses more battery, then I'm not for it. I don't want to use more battery on something I can easily do without. |
|
|
|
|
|
|
#8 |
|
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46
Karma: 113263
Join Date: Apr 2024
Location: Belgium
Device: Kobo Libra Color, Kobo Clara Color
|
I still need to look into the line-spacing bug, but I did find some other bugs that I've addressed in the latest update for the mod that may have an impact on how text flows. I'll keep you posted if I find an actual fix.
I may just bake "more line height options" into this mod, that would not be a bad addition. It would remove the need for patching it in every time. Anyway, what I fixed: issues related to kerning and letter-spacing in books that use that styling feature via CSS. I've updated the README on GitHub, so if you're curious. |
|
|
|
|
|
#9 | |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 84,178
Karma: 153715495
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
|
|
|
|
|
#10 |
|
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 190
Karma: 251718
Join Date: May 2018
Device: Kobo Libra 2, Clara HD, Aura, Touch
|
I've been using this for a few days now, and this is also awesome work, just like your page turning animation. With this fix you saved me from going back to KOReader, because I really don't like the default rendering on Nickel with kepubs. Epubs look way better, but with that we lose a lot of functionality. Your fixes mitigate the differences between the two.
|
|
|
|
|
|
#11 |
|
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 132
Karma: 67444
Join Date: Dec 2018
Device: Kobo Clara HD
|
Amazing work!
Something I noticed when upgrading from 0.5 to 0.7 is that the config file does not update to include the new flags (ntf_cpsp_fix and ntf_letterspace_spaces) as well. Last edited by xyclonei; Today at 10:33 AM. |
|
|
|
|
|
#12 | |
|
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46
Karma: 113263
Join Date: Apr 2024
Location: Belgium
Device: Kobo Libra Color, Kobo Clara Color
|
Quote:
Edit: Any missing fixes are automatically assumed to be on, but I think it's nicer if the config is automatically updated when a newer update is installed. It's on my todo list. Last edited by MrSilverstrike; Today at 11:22 AM. |
|
|
|
|
|
|
#13 |
|
Weirdo
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,152
Karma: 13000000
Join Date: Nov 2019
Location: Wuppertal, Germany
Device: Kobo Sage, Kobo Libra 2, reMarkable PaperPro
|
For some reason each chapter makes the font really thin until I go back one page and then continue.
|
|
|
|
|
|
#14 |
|
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46
Karma: 113263
Join Date: Apr 2024
Location: Belgium
Device: Kobo Libra Color, Kobo Clara Color
|
|
|
|
|
|
|
#15 |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 84,178
Karma: 153715495
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
@MrSilverstrike, can you do me a favor? can you make new sample images using the font ChareInk7SP? Thanks.
You can get ChareInk7SP from MR at https://www.mobileread.com/forums/sh...d.php?t=184056 |
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Typesetting Shakespeare | Psymon | ePub | 26 | 06-20-2016 04:21 AM |
| Best typesetting/typography engine: Kindle Voyage vs Kobo Aura H2O | cerem0ny | Which one should I buy? | 16 | 04-18-2016 08:45 AM |
| Is there a way to import kepub to calibre/convert a kepub to other formats? | Major General | Library Management | 9 | 04-08-2014 10:00 PM |
| iOS Devices [mod: might be] Banned in Europe [mod: Germany] | CyGuy | News | 27 | 12-13-2011 07:47 AM |