Thread: Kobo Bug thread
View Single Post
Old 11-08-2013, 04:43 AM   #323
jgoguen
Generally Awesome Person
jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.
 
Posts: 1,100
Karma: 2191133
Join Date: Jan 2013
Location: /dev/kmem
Device: Kobo Clara HD, Kindle Oasis
Quote:
Originally Posted by arspr View Post
It's easier than that. Here you have a pretty simple epub to play around with it. (Thanks, Sigil ).

Or if you want to build it yourself, its html code is just this:

Code:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title>Dashes Test</title>
</head>

<body style="text-align:justify;">
  <p>—This is the reference sentence —whoever exclaimed.</p>

  <p>—This is AStressTestWithVeryLongWordsAgainstJustification, —whoever exclaimed—. TheStressTest ContinuesHere.</p>

  <p><i>Now I'm protecting the wrong wrap with the</i> &lt;span style="white-space:nowrap;"&gt; <i>workaround:</i></p>

  <p>—This is AStressTestWithVeryLongWordsAgainstJustification, <span style="white-space:nowrap">—whoever</span> <span style="white-space:nowrap">exclaimed—.</span> TheStressTest ContinuesHere.</p>

  <p>&nbsp;</p>

  <p><b><i>Now the same sentences using</i> &amp;mdash; <i>instead of —:</i></b></p>

  <p>&mdash;This is the reference sentence &mdash;whoever exclaimed.</p>

  <p>&mdash;This is AStressTestWithVeryLongWordsAgainstJustification, &mdash;whoever exclaimed&mdash;. TheStressTest ContinuesHere.</p>

  <p><i>Now I'm protecting the wrong wrap with the</i> &lt;span style="white-space:nowrap;"&gt; <i>workaround:</i></p>

  <p>&mdash;This is AStressTestWithVeryLongWordsAgainstJustification, <span style="white-space:nowrap">&mdash;whoever</span> <span style="white-space:nowrap">exclaimed&mdash;.</span> TheStressTest ContinuesHere.</p>
</body>
</html>
Play with it as much as you want.

I also upload a screenshot from Calibre e-book viewer which shows the right rendering and how the span trick fixes the wrong sentence wrap.

Edited----
Hey, what the hell! Here you have a picture directly taken from my Aura HD. In the second sentence the problem is already shown but the third one is just crazy. (The bigger spaces in the third sentence are caused because the span trick doesn't allow "exclaimed" and its "—" being in different lines).

Playing with margins and font sizes you can make it more or less obvious.

OTOH. Is it possible to take a screenshot directly from the Kobo Aura HD with some trick? (In my old PRS-650, you need PRS+ modified firmware to get it)

IMPORTANT EDIT - NEW BUG!!!! -------
Look at the new image (IMG_0241.jpg) which uses epub renderer NOT kepub one:

<span style="white-space:nowrap;"> has stopped working!!!!
The main issue, the extra spaces around the em-dashes, was a plugin bug fixed in the next release (whenever I get a chance to do final testing and upload it) but when viewing a justified book you may still see the dashes moved to the next line. The only fix I found was to use no justification.

The problem of "white-space: nowrap" not working sounds like a bug in the renderer, but I can understand if they just ignore it. The renderer isn't running on hardware as flexible as a standard browser and forcing line breaks at the right places anyway would look very similar to just ignoring the white-space property.
jgoguen is offline   Reply With Quote