View Single Post
Old 05-08-2013, 11:40 AM   #49
Anak
Guru
Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.
 
Posts: 600
Karma: 641742
Join Date: Mar 2012
Location: DE
Device: Kobo Glo
I think I've found the answer/solution.
There are "two" kepub versions
1. The "old version", where the kobo.css (/*VERSION:1*/) contains code, and causes the mentioned problems
2. The "new version", where the kobo.css is just an empty file, and doesn't have the mentioned problems.

At some point in 2012 Kobo made some changes to the kepub html code to improve the text lay out.
Kobo should have patched all existing kepubs by replacing the kobo.css with an empty one.

The old kobo.css
Code:

html {
height: 100% !important;
margin: 0 !important;
}
img {
max-width: 100%;
max-height: 100%;
overflow: none;
}
body {
font-size: 14pt;
line-height: 1.575em !important;
font-family: 'Georgia' !important;
margin: 0 !important;
height: 100% !important;
overflow-wrap: break-word !important;
}
.KBHeading, h1 {
margin-top: 0 !important;
display: block !important;
text-align: center !important;
font-family: 'Georgia' !important;
font-size: 1.33em !important;
text-transform: uppercase !important;
letter-spacing: 0.1em !important;
}
.KBSubheading, h2 {
margin-top: 0 !important;
display: block !important;
text-align: center !important;
font-family: 'Georgia' !important;
font-size: 1.25em !important;
}
.KBSubsubheading, h3, h4, h5, h6 {
margin-top: 0 !important;
font-size: 1em !important;
font-family: 'Georgia' !important;
font-weight: bold !important;
}
a:link {
color: #1DAEC7 !important;
}
a:visited {
color: #1DAEC7 !important;
}
a:hover {
color: #1DAEC7 !important;
}
a:active {
color: #1DAEC7 !important;
}
p, div {
font-size: 14pt;
line-height: 1.475em !important;
text-indent: 0 !important;
margin: 0 !important;
padding-top: 0 !important;
padding-bottom: 1.0em !important;
text-align: left !important;
}
.KBIcon {
padding-top: 0 !important;
}
.KBFooter {
position: static !important;
margin-left: auto !important;
padding-top: 10% !important;
}
Blank lines
Code:
padding-bottom: 1.0em !important;
to
padding-bottom: 0 !important;
Solves the unwanted blank lines between sentences or paragraphs.

Text alignment to center text
However, fooling around with text alignment settings in the kobo.css didn't solve the bug that text that should be displayed as centered was actually displayed as aligned to the left.
But when all code in de kobo.css was deleted or replaced by an empty one the text alignment issue was solved.

1. Kepub preview, released May 2013 (no issues, "new kepub")
2. Kepub preview, released September 2012 ("old kepub")

Edit:
Quote:
Originally Posted by davidfor View Post
Sorry, I think you missed my point. I don't think the source version of the epub and kepub you use in the first post are the same. There are differences in the rendering: the kepub render tends to use a bigger font and the minimum margin is larger.
@DavidFor. It's the same source and I understand why you thought that. In the kobo.css the default font size is set to 14pt and explains why the font size is 16,67% larger. The default font size in RMSDK and Access NetFront BookReader is 12pt.
The kepub has larger margins because "Kobo" uses a default page margin that come on top of the original page margins as defined in the epub.
Except when margins are defined in a template.xpgt this rule of thumb doesn't apply.
If you create a epub and set all page margins to 0 (e.g.: @page {margin:0;}, p {margin:0;padding:0;}) you'll see that the kepub has default margins.

Last edited by Anak; 05-09-2013 at 05:14 AM.
Anak is offline   Reply With Quote