Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 04-22-2025, 10:47 AM   #3241
hengyu
Connoisseur
hengyu began at the beginning.
 
Posts: 56
Karma: 10
Join Date: Aug 2016
Device: Kobo Libra Colour
Hi all,

I've noticed that KEPUBs converted by Calibre 8 onwards have badly broken justification (see comparison shot).

I raised a Calibre bug here:
https://bugs.launchpad.net/calibre/+bug/2107778

It was discovered that the output is different apparently in how the spaces are placed in or around the span tags. This apparently breaks justified text on the Kobo.

Was informed by Kovid that this was necessary to fix highlighting without ugly gaps, which was more important, since justified text was not an important part of reading, and that I was the only one complaining. And that his recommended solution would be to simply not use justified text. :shrug

Which is fair enough, but I'd love to see if anyone's discovered a workaround for those who use text justification?

Is there also some possibility of some config on the device causing this and potentially approaching a fix from that angle?
Attached Thumbnails
Click image for larger version

Name:	new2.jpg
Views:	92
Size:	205.0 KB
ID:	215222  
hengyu is offline   Reply With Quote
Old 04-22-2025, 10:52 AM   #3242
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,050
Karma: 144284074
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Patrick Faret View Post
Bonjour, à propos de KobotouchExtended,
je veins d'apprendre qu'il est devenu natif dans Calibre.
Comment accéder à ses paramètres
Merci
What operating system and what version of calibre are you using? If you use calibre 8, then you'll configure the KoboTouch driver to do what you want when sending to your Kobo.
JSWolf is online now   Reply With Quote
Old 04-22-2025, 11:02 AM   #3243
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,050
Karma: 144284074
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by hengyu View Post
Hi all,

I've noticed that KEPUBs converted by Calibre 8 onwards have badly broken justification (see comparison shot).

I raised a Calibre bug here:
https://bugs.launchpad.net/calibre/+bug/2107778

It was discovered that the output is different apparently in how the spaces are placed in or around the span tags. This apparently breaks justified text on the Kobo.

Was informed by Kovid that this was necessary to fix highlighting without ugly gaps, which was more important, since justified text was not an important part of reading, and that I was the only one complaining. And that his recommended solution would be to simply not use justified text. :shrug

Which is fair enough, but I'd love to see if anyone's discovered a workaround for those who use text justification?

Is there also some possibility of some config on the device causing this and potentially approaching a fix from that angle?
In Kobo eReader.conf (in .kobo/kobo) on your Kobo, under [Reader], add
Code:
webkitTextRendering=geometricPrecision
and see if that fixes the problem.

Also, there is a patch that will reduce the space in KePub. I do not know if it works with the current Libra Colour firmware. You can try the previous firmware's patches and see if it works with the current firmware. You will have to edit it for the new firmware and then try it.

https://www.mobileread.com/forums/sh...d.php?t=366569
JSWolf is online now   Reply With Quote
Old 04-22-2025, 11:14 AM   #3244
hengyu
Connoisseur
hengyu began at the beginning.
 
Posts: 56
Karma: 10
Join Date: Aug 2016
Device: Kobo Libra Colour
I've already got webkitTextRendering=geometricPrecision set, unfortunately!

The problem is not so much that the spaces are all too big. Sometimes they are also too small, like the one that's after the period here.

From what I understand from the bug report's comments, the KEPUB conversion in native Calibre 8 was fixed to solve some highlighting related issue by putting the whitespaces inside the spans, but in so doing this causes Kobo to not properly render them in justified text.

It's quite a shame that something so basic was broken in order to fix gaps in highlighting (which admittedly is also a very basic thing).

Are there KEPUB books that are directly purchased officially instead of converted from EPUB? I wonder if this issue also happens in that context?
Attached Thumbnails
Click image for larger version

Name:	diff.png
Views:	49
Size:	108.1 KB
ID:	215223  
hengyu is offline   Reply With Quote
Old 04-22-2025, 11:55 AM   #3245
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 44,695
Karma: 168431851
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by hengyu View Post
Are there KEPUB books that are directly purchased officially instead of converted from EPUB? I wonder if this issue also happens in that context?
Books that are synced directly from Kobo are in kepub. And yes, they will show many of the same issues, spaces inside words, varying gaps between words, etc.

That is one reason that I personally only use kepub for books where the images are worth zooming which isn't all that many. I accept the oddities on Kobo Plus books since the authors will not be paid if I don't read the original.

I also prefer using left justification (AKA ragged right) since that removes the justification oddities from the equation. Until an ereader has decent support for micro-typography AKA micro-justification, justified text on my ereader screen is never going to look the way I want it to look.
DNSB is offline   Reply With Quote
Old 04-22-2025, 12:34 PM   #3246
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,592
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Quote:
Originally Posted by hengyu View Post
I've already got webkitTextRendering=geometricPrecision set, unfortunately!

The problem is not so much that the spaces are all too big. Sometimes they are also too small, like the one that's after the period here.

From what I understand from the bug report's comments, the KEPUB conversion in native Calibre 8 was fixed to solve some highlighting related issue by putting the whitespaces inside the spans, but in so doing this causes Kobo to not properly render them in justified text.

It's quite a shame that something so basic was broken in order to fix gaps in highlighting (which admittedly is also a very basic thing).

Are there KEPUB books that are directly purchased officially instead of converted from EPUB? I wonder if this issue also happens in that context?
Just a question. Did the highlighting issue exist with this driver before the change to calibre 8.0?
Terisa de morgan is online now   Reply With Quote
Old 04-22-2025, 12:44 PM   #3247
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 44,695
Karma: 168431851
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by Terisa de morgan View Post
Just a question. Did the highlighting issue exist with this driver before the change to calibre 8.0?
Yes, there were several complaints about highlighting along with spaces disappearing.
DNSB is offline   Reply With Quote
Old 04-22-2025, 06:18 PM   #3248
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,247
Karma: 16539642
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
Quote:
Originally Posted by Terisa de morgan View Post
Just a question. Did the highlighting issue exist with this driver before the change to calibre 8.0?
Quote:
Originally Posted by DNSB View Post
Yes, there were several complaints about highlighting along with spaces disappearing.
I think you may be talking at cross purposes here.

The "disappearing spaces" problem occurred due to accidental coding errors introduced to the old KTE plugin during a few fairly recent updates (pre-calibrev8), which made some slight changes to the regex it used during koboSpan creation. The missing spaces were actual "lost spaces" accidentally removed during kepubify-ing.

OTOH, the "highlight gaps", referenced by @hengyu, occur because an early version of calibre v8's kepubify allowed some (not all) body text space chars to remain outside of the 2 koboSpans on either side of the space char. Highlighting is only applied to text within a koboSpan - hence the visible gaps.

Someone complained about the aesthetic of these gaps so I think Kovid changed the calibre code so that all text, including spaces, was always contained within a koboSpan. The result is no highlight gaps. This is what the old KTE plugin always did because it aimed to reproduce what Kobo do in their purchased OTA kepubs. AFAIK calibrev8 has never "lost" any spaces.

I know from my own experimentation with kepubify-ing epubs (in 2016) that, ironically, leading and trailing spaces inside koboSpans are one of the main contributing factors to uneven spacing seen in kepubs which are both full-justified and have font kerning/ligatures enabled.
jackie_w is offline   Reply With Quote
Old 04-23-2025, 02:50 PM   #3249
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,050
Karma: 144284074
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by hengyu View Post
I've already got webkitTextRendering=geometricPrecision set, unfortunately!

The problem is not so much that the spaces are all too big. Sometimes they are also too small, like the one that's after the period here.

From what I understand from the bug report's comments, the KEPUB conversion in native Calibre 8 was fixed to solve some highlighting related issue by putting the whitespaces inside the spans, but in so doing this causes Kobo to not properly render them in justified text.

It's quite a shame that something so basic was broken in order to fix gaps in highlighting (which admittedly is also a very basic thing).

Are there KEPUB books that are directly purchased officially instead of converted from EPUB? I wonder if this issue also happens in that context?
Can you please try the version of calibre 8 prior to the fix for the highlighting to see what you get? If the page is rendered correctly, then you can put in a bug report.
JSWolf is online now   Reply With Quote
Old 04-23-2025, 03:24 PM   #3250
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 10,650
Karma: 74166147
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Quote:
Originally Posted by JSWolf View Post
Can you please try the version of calibre 8 prior to the fix for the highlighting to see what you get? If the page is rendered correctly, then you can put in a bug report.
Can use portable version (Windows) to avoid having to uninstall.
ownedbycats is offline   Reply With Quote
Old 04-23-2025, 05:15 PM   #3251
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,327
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by JSWolf View Post
Can you please try the version of calibre 8 prior to the fix for the highlighting to see what you get? If the page is rendered correctly, then you can put in a bug report.
Kovid has already said he isn't going to change this. You get continuous highlighting or better justification, but not both. He chose highlighting.
chaley is offline   Reply With Quote
Old 04-24-2025, 04:33 PM   #3252
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,050
Karma: 144284074
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by chaley View Post
Kovid has already said he isn't going to change this. You get continuous highlighting or better justification, but not both. He chose highlighting.
I'd prefer justification. The highlighting wasn't an issue at all.
JSWolf is online now   Reply With Quote
Old 04-25-2025, 11:37 AM   #3253
hengyu
Connoisseur
hengyu began at the beginning.
 
Posts: 56
Karma: 10
Join Date: Aug 2016
Device: Kobo Libra Colour
Quote:
Originally Posted by JSWolf View Post
I'd prefer justification. The highlighting wasn't an issue at all.
Please let him know that. He was rather cross with me in our exchange on the bug report for being "the only person in millions" complaining about his choice and insisted that justification wasn't a fundamental functionality :shrug
hengyu is offline   Reply With Quote
Old 04-27-2025, 03:24 PM   #3254
compurandom
Wizard
compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.
 
Posts: 1,000
Karma: 418804
Join Date: Jun 2015
Device: Rocketbook, kobo aura h2o, kobo forma, kobo libra color
Quote:
Originally Posted by hengyu View Post
Please let him know that. He was rather cross with me in our exchange on the bug report for being "the only person in millions" complaining about his choice and insisted that justification wasn't a fundamental functionality :shrug
This really sounds like a bug or misfeature in the kobo kepub renderer.

However, considering we can optimize it in one of two ways, maybe this needs to be an option in the converter?
compurandom is offline   Reply With Quote
Old 04-27-2025, 06:25 PM   #3255
icallaci
Guru
icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.
 
Posts: 815
Karma: 6528026
Join Date: Sep 2012
Device: Kobo Elipsa
Quote:
Originally Posted by compurandom View Post
However, considering we can optimize it in one of two ways, maybe this needs to be an option in the converter?
That would be really helpful, if it can be done. I don't care about highlighting, but the terrible spacing in kepubs drives me crazy (and I've tweaked and configured until it sorta kinda works, but not very well).
icallaci is offline   Reply With Quote
Reply

Tags
error, kobo aura one


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kobo Device Driver Update davidfor Devices 284 05-24-2019 05:24 PM
[Device Plugin] Kindle 2, 3, 4, Touch Device Interface MBP Update Mod cryzed Plugins 7 10-28-2012 04:58 PM
[Device Interface Plugin] Update for Nook Color Driver jmricker Plugins 0 10-22-2011 10:11 AM
Touch Kobo Touch Extended 2 Year Warranty - Is it worth the $34.99? EverC Kobo Reader 11 08-31-2011 11:47 PM
Touch Kobo Touch Extended Warranty Program SensualPoet Kobo Reader 1 07-17-2011 04:08 AM


All times are GMT -4. The time now is 05:04 PM.


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