View Single Post
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