Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader

Notices

Reply
 
Thread Tools Search this Thread
Old 05-05-2022, 09:52 AM   #61
CyberPaul
Groupie
CyberPaul can extract oil from cheeseCyberPaul can extract oil from cheeseCyberPaul can extract oil from cheeseCyberPaul can extract oil from cheeseCyberPaul can extract oil from cheeseCyberPaul can extract oil from cheeseCyberPaul can extract oil from cheeseCyberPaul can extract oil from cheese
 
CyberPaul's Avatar
 
Posts: 159
Karma: 1000
Join Date: Aug 2016
Device: Kindle Voyage - Tolino Vision 4 HD - Kobo Sage
The only issue I have experienced so far is with ellipsis (three dots):


While EPUB is correctly shown:


It looks like the KEPUB renderer is managing the text string "Ma..." ("But..." in italian) as they were separate words, I guess. Any idea on how to solve this?

Last edited by CyberPaul; 05-05-2022 at 10:30 AM.
CyberPaul is offline   Reply With Quote
Old 05-05-2022, 11:13 AM   #62
MGlitch
Wizard
MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.
 
Posts: 2,841
Karma: 22003124
Join Date: Aug 2014
Device: Kobo Forma, Kobo Sage, Kobo Libra 2
Quote:
Originally Posted by CyberPaul View Post
The only issue I have experienced so far is with ellipsis (three dots):


While EPUB is correctly shown:


It looks like the KEPUB renderer is managing the text string "Ma..." ("But..." in italian) as they were separate words, I guess. Any idea on how to solve this?
Assuming you’re using the word spacing patch you can try changing the font size, I had a single issue thus far now where two words looked like they ran together and increasing the font size a step resolved the issue. Likewise decreasing might also work. Line spacing as well. You’re basically trying to do anything to change the words that are on that line of text.

If you aren’t using the patch then try using it.

Unless this issue is for every ellipsis even if the line of text ends before the edge of the screen.
MGlitch is offline   Reply With Quote
Advert
Old 05-05-2022, 01:07 PM   #63
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,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by CyberPaul View Post
It looks like the KEPUB renderer is managing the text string "Ma..." ("But..." in italian) as they were separate words, I guess. Any idea on how to solve this?
You would need to look at the exact HTML code of this paragraph in your kepub to be sure, but I'm going to guess this is a typical example of the kepub reading app's constant struggle to space words (in a way which "looks nice" to all users) when text is fully left/right justified. It may well have nothing to do with the fact that an ellipsis is present in the snippet of text you've highlighted.

I don't know how to explain this in a way that won't cause your eyes to glaze over, but ...

IMHO the basic problem is the over-aggressive algorithm used to add koboSpans to standard epub text to turn it into a kepub. These koboSpans are mandatory for kepubs to record reading progress, annotations, dictionary look-up. As far as I know, all current methods of creating kepubs (buy direct from Kobo Store, calibre conversion, calibre driver KoboTouchExtended, Kepubify) use the same aggressive algorithm.

When the kepub reading app tries to space out words to get the non-ragged right edge, sometimes it struggles if the text fragment inside a koboSpan contains very few (maybe 0 or 1) spaces. For some reason it decides to use letter-spacing within the word instead, e.g. your 'Ma…' becomes 'M a …'. You can also see some similar examples of this happening with the first word on a line in the first screenshot in my post from 2016. I also imagine it can happen (but not always) when the first word of a new sentence falls at the end of a line.

The only way to "fix" it is to read with ragged right edge or forget about kepubs altogether and use epub only.

You can "improve" things in many ways by doing as MGlitch says and "do anything to change the words that are on that line of text". No matter what you do, there's no guarantee that a "fix" for a problematic text fragment on one page won't just create 2 new ones on the next page.

If you want to stick with kepub and full left/right justification, and ligatures/kerning I think it's fair to say that the more words you typically get on a line the more space-between-words you will get, and therefore the better the chances of the kepub reading app being able to micro-space the words without resorting to using ugly letter-spacing. All of the following will probably result in fewer occurrences of the ugly letter-spacing:
  • use a Kobo with a bigger screen
  • reduce the left/right margins
  • use a smaller font-size
  • don't enable ligatures/kerning
  • try the patch above to reduce word-spacing, which will result in some lines having more words than without the patch.
  • use hyphenation
  • install the best hyphenation dictionary you can find for your language
  • n-dash versus m-dash: Books which use 'word1 – word2' may have less problems than those which use 'word1—word2'
  • ellipsis: Books which use 'word1 … word2' may have less problems than those which use 'word1…word2'
  • read in a language which uses lots of short words rather than lots of compound long ones (OK this is not really a choice most users have )
  • change the koboSpan algorithm to be less aggressive (needs programming skills)
jackie_w is offline   Reply With Quote
Old 05-05-2022, 01:57 PM   #64
CyberPaul
Groupie
CyberPaul can extract oil from cheeseCyberPaul can extract oil from cheeseCyberPaul can extract oil from cheeseCyberPaul can extract oil from cheeseCyberPaul can extract oil from cheeseCyberPaul can extract oil from cheeseCyberPaul can extract oil from cheeseCyberPaul can extract oil from cheese
 
CyberPaul's Avatar
 
Posts: 159
Karma: 1000
Join Date: Aug 2016
Device: Kindle Voyage - Tolino Vision 4 HD - Kobo Sage
Thanks for the feedback. Still need to read all the long one by jackie_w.
Of course I'm using the word spacing patch and also tried different values with no success.
Increasing or reducing the font (+/- 4 times) improves things, but this is the size I like more. I will try to investigate the html used to understand more.
CyberPaul is offline   Reply With Quote
Old 05-05-2022, 02:56 PM   #65
CyberPaul
Groupie
CyberPaul can extract oil from cheeseCyberPaul can extract oil from cheeseCyberPaul can extract oil from cheeseCyberPaul can extract oil from cheeseCyberPaul can extract oil from cheeseCyberPaul can extract oil from cheeseCyberPaul can extract oil from cheeseCyberPaul can extract oil from cheese
 
CyberPaul's Avatar
 
Posts: 159
Karma: 1000
Join Date: Aug 2016
Device: Kindle Voyage - Tolino Vision 4 HD - Kobo Sage
Here is the piece of html (taken from the original EPUB before converting it to KEPUB with Kobo Touch Extended plugin):
Quote:
<p>Se non avessi creduto al principio elementare che non si può continuare all’infinito a mandare roba dall’alto in basso senza contraccambiarla con un invio dal basso in alto, mi sarei lasciato vincere dal sentimentalismo. Ma… <em>Tanstaafl</em>: i pranzi gratis non esistono, tanto a Bombay quanto sulla Luna.</p>
Nothing weird then...

Last edited by CyberPaul; 05-05-2022 at 03:01 PM.
CyberPaul is offline   Reply With Quote
Advert
Old 05-05-2022, 03:54 PM   #66
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,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by CyberPaul View Post
Here is the piece of html (taken from the original EPUB before converting it to KEPUB with Kobo Touch Extended plugin):

Nothing weird then...
It's the HTML of this bit of text in the kepub on your Kobo that's important. Not the original epub.

I'm going to guess it looks something like this. (The id="kobo.x.x" numbers will be different):
Quote:
<p><span id="kobo.1.1" class="koboSpan">Se non avessi creduto al principio elementare che non si può continuare all’infinito a mandare roba dall’alto in basso senza contraccambiarla con un invio dal basso in alto, mi sarei lasciato vincere dal sentimentalismo. </span><span id="kobo.1.2" class="koboSpan">Ma… </span><em><span id="kobo.1.3" class="koboSpan">Tanstaafl</span></em><span id="kobo.2.1" class="koboSpan">: </span><span id="kobo.2.2" class="koboSpan">i pranzi gratis non esistono, tanto a Bombay quanto sulla Luna.</span></p>
As you can see, it's fragmented into 5 koboSpans. The 2nd koboSpan in red is where the kepub reading app has decided to apply its ugly letter-spacing.

The koboSpan algorithm I use myself would fragment into 3 pieces, like this:
Quote:
<p><span id="kobo.1.1" class="koboSpan">Se non avessi creduto al principio elementare che non si può continuare all’infinito a mandare roba dall’alto in basso senza contraccambiarla con un invio dal basso in alto, mi sarei lasciato vincere dal sentimentalismo. Ma…</span> <em><span id="kobo.1.2" class="koboSpan">Tanstaafl</span></em><span id="kobo.2.1" class="koboSpan">: i pranzi gratis non esistono, tanto a Bombay quanto sulla Luna.</span></p>
and would be less likely (but not guaranteed) to display the problem you saw.

Additionally, if this was my book, I'd always have spaces around an ellipsis. I don't really worry whether others consider that to be "bad" typography. In English books it's not apparent to me that there are any "standards" about such things.

Last edited by jackie_w; 05-05-2022 at 03:59 PM. Reason: typo
jackie_w is offline   Reply With Quote
Old 05-05-2022, 06:03 PM   #67
CyberPaul
Groupie
CyberPaul can extract oil from cheeseCyberPaul can extract oil from cheeseCyberPaul can extract oil from cheeseCyberPaul can extract oil from cheeseCyberPaul can extract oil from cheeseCyberPaul can extract oil from cheeseCyberPaul can extract oil from cheeseCyberPaul can extract oil from cheese
 
CyberPaul's Avatar
 
Posts: 159
Karma: 1000
Join Date: Aug 2016
Device: Kindle Voyage - Tolino Vision 4 HD - Kobo Sage
Tomorrow I will post the KEPUB html.
Meanwhile, when you refer to the algorithm you use, what do you mean exactly? Do you have your own Calibre plug-in? Or rather you do it manually?!
Regarding typography rules, I confirm that at least in Italian the ellipsis are never preceded by a space.

Last edited by CyberPaul; 05-05-2022 at 06:07 PM.
CyberPaul is offline   Reply With Quote
Old 05-05-2022, 06:31 PM   #68
MGlitch
Wizard
MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.
 
Posts: 2,841
Karma: 22003124
Join Date: Aug 2014
Device: Kobo Forma, Kobo Sage, Kobo Libra 2
I majored in English. The “rules” are more like suggestions that are sometimes adhered to and sometimes ignored. They are also sometimes lies told to children.
MGlitch is offline   Reply With Quote
Old 05-05-2022, 07:36 PM   #69
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: 35,498
Karma: 145557716
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
<Expletive deleted> duplicate message deleted.

Last edited by DNSB; 05-05-2022 at 07:41 PM.
DNSB is offline   Reply With Quote
Old 05-05-2022, 07:39 PM   #70
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: 35,498
Karma: 145557716
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by CyberPaul View Post
Regarding typography rules, I confirm that at least in Italian the ellipsis are never preceded by a space.
You did notice that the M and a were also spaced out? The renderer is adding space between the characters to avoid have overly wide spaces between the words.

That is one of the several reasons I prefer to read left justified text.
DNSB is offline   Reply With Quote
Old 05-05-2022, 07:51 PM   #71
MGlitch
Wizard
MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.
 
Posts: 2,841
Karma: 22003124
Join Date: Aug 2014
Device: Kobo Forma, Kobo Sage, Kobo Libra 2
Quote:
Originally Posted by DNSB View Post
You did notice that the M and a were also spaced out? The renderer is adding space between the characters to avoid have overly wide spaces between the words.

That is one of the several reasons I prefer to read left justified text.
I suspect Paul’s comment was less about the issue in his older post and more about Jackie’s comment about ellipses in her books and how they may or may not be governed by the at times ephemeral rules of English grammar.
MGlitch is offline   Reply With Quote
Old 05-05-2022, 08:23 PM   #72
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: 74,037
Karma: 129333114
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 DNSB View Post
You did notice that the M and a were also spaced out? The renderer is adding space between the characters to avoid have overly wide spaces between the words.

That is one of the several reasons I prefer to read left justified text.
Does left justified text work with hyphenation (KePub)?
JSWolf is online now   Reply With Quote
Old 05-05-2022, 08:43 PM   #73
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,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by CyberPaul View Post
Meanwhile, when you refer to the algorithm you use, what do you mean exactly? Do you have your own Calibre plug-in? Or rather you do it manually?!
Yes, the former. As I mentioned in the 2016 post I previously linked to, I forked the calibre KoboTouchExtended driver/plugin to test my theory about koboSpans. During the last six years I've continued to develop it by changing/removing features I didn't like, adding new "bright ideas" (maybe crackpot ideas ). So the 2 versions are, by now, probably quite far apart. I've never found any good reason to go back to the official version. I still think the crude algorithm used to try to wrap a koboSpan around every sentence is unhelpful to the aesthetics of full justification. At least, in English books. I can't speak for other languages.
jackie_w is offline   Reply With Quote
Old 05-05-2022, 08:48 PM   #74
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: 74,037
Karma: 129333114
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 jackie_w View Post
Yes, the former. As I mentioned in the 2016 post I previously linked to, I forked the calibre KoboTouchExtended driver/plugin to test my theory about koboSpans. During the last six years I've continued to develop it by changing/removing features I didn't like, adding new "bright ideas" (maybe crackpot ideas ). So the 2 versions are, by now, probably quite far apart. I've never found any good reason to go back to the official version. I still think the crude algorithm used to try to wrap a koboSpan around every sentence is unhelpful to the aesthetics of full justification. At least, in English books. I can't speak for other languages.
How does your KePub code compare to KePubify's code?
JSWolf is online now   Reply With Quote
Old 05-05-2022, 09:06 PM   #75
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,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by JSWolf View Post
How does your KePub code compare to KePubify's code?
My kepub stuff pre-dated Kepubify by a few years, so they are unrelated. I've never used it so you'd have to ask @geek1011 about details. I *think* he looked closely at the official KTE driver as a start-point when he was developing it but I don't know whether he replicated exact functionality.
jackie_w is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Adjusting 'text weight' on Kindle Paperwhite susmoka Amazon Kindle 8 03-07-2016 09:51 PM
EPUB to KEPUB line spacing Buhaj47 Conversion 1 12-07-2015 04:00 PM
Aura epub, kepub, hyphenation and word-spacing pblasi Kobo Reader 5 08-22-2014 05:13 AM
Left-justified text in a right-justified box Skeezix Conversion 4 11-15-2011 08:44 PM
Justified word paragraph not wrapping in mobi wlloydw Conversion 0 03-05-2011 03:03 PM


All times are GMT -4. The time now is 10:37 AM.


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