View Single Post
Old 12-24-2024, 12:41 PM   #570
jsnell
Junior Member
jsnell began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Nov 2009
Device: Kindle 2
Span swallowing spaces

I just found a book with very weird behavior. The EPUB version loads with proper rendering. The converted KEPUB displays incorrectly (I tested on Libra 2 and Libra Colour).

Here's what seems to be happening. This code:

Code:
the band ‹span epub:type="pagebreak" id="page_46" role="doc-pagebreak" title="46"/>My Two Hands
is rendered on the Kobo as "the bandMy Two Hands" -- in other words, the space before the span tag is ignored. I can verify that this is not a font rendering artifact, the Kobo actually thinks "bandMy" is a single word. So for some reason, Kobo's kepub parser is ignoring the space before the span tag.

similarly, this code at the beginning of a section with small caps:

Code:
‹p class="para-sp"><span class="char-first"><span class="fv-smalLcaps">Whatever. One night, ‹/span></span›Susannah
is rendered as "WHATEVER. ONE NIGHT,Susannah" -- the small caps run into the normal caps with the space before the </span> tag removed.

I have no idea if this is the quirk of one epub or what, but I've never seen it before and wanted to report it in case there's something the kepub translator should be working around. Clearly this goes beyond a CSS style issue, I think it's a bug in Kobo's renderer?!
jsnell is offline   Reply With Quote