Thread: Kobo Patcher
View Single Post
Old 11-17-2013, 05:14 AM   #446
ShellShock
Wizard
ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.
 
ShellShock's Avatar
 
Posts: 1,178
Karma: 2431850
Join Date: Sep 2008
Device: IPad Mini 2 Retina
Quote:
Originally Posted by DNSB View Post
The change from 0.9 to 1.35 is the full right to full left movement of the slider. I stopped at 3 spots in between and the spacing shown in the KoboeReader.conf matched what I expected. I changed the default line spacings in the kpg.conf since I find all too often that dropping the line spacing below 0.9 allows ascenders and descenders to overlap which I find very annoying.
There is something weird going on here though. This is what I am using

Code:
<Patch>
patch_name = `My line spacing values` 
patch_enable = `yes`
# Bypass code-injected values - the wonderful know-how from Kobo programmers
replace_bytes = 817CEE, 57 F5 16 EE, 00 46 00 46
replace_bytes = 817D3C, 57 F5 EE ED, 00 46 00 46
replace_bytes = 817D62, 57 F5 DC ED, 00 46 00 46
replace_bytes = 817D98, 57 F5 C0 ED, 00 46 00 46
replace_bytes = 817DF4, 57 F5 92 ED, 00 46 00 46
# Values for replace
replace_float = 817E38, 1.05, 0.8
replace_float = 817E40, 1.07, 0.9
replace_float = 817E48, 1.1,  1.0
replace_float = 817E50, 1.35, 1.1
replace_float = 817E58, 1.7,  1.2
replace_float = 817E60, 1.8,  1.3
replace_float = 817E68, 2.2,  1.4
replace_float = 817E70, 2.4,  1.5
replace_float = 817E78, 2.6,  1.75
replace_float = 817E80, 2.8,  2.0
</Patch>
When I set the slider to the fifth position, the Kobo eReader.conf setting is

readingLineHeight=1.2

which is what I would expect, but when actually reading a book, the line-spacing looks a lot more then 1.2em to me. This is the CSS in the book:

Code:
.para
{
    font-size: medium;
    font-weight: normal;
    /* line-height: 1.2em; */
    margin-top: 0;
    margin-bottom: 0;
    margin-left: 0;
    margin-right: 0;
    text-align: left;
    text-indent: 1.5em;
}
i.e., I am using the Kobo eReader.conf setting. This is with the built-in Georgia font, with some Advanced tweaks to make it darker.

If I change the style to

Code:
.para
{
    font-size: medium;
    font-weight: normal;
    line-height: 1.2em;
    margin-top: 0;
    margin-bottom: 0;
    margin-left: 0;
    margin-right: 0;
    text-align: left;
    text-indent: 1.5em;
}
(spacing set from the book) I get much closer line-spacing. So the CSS seems to give me the correct spacing, but if I rely just on readingLineHeight, the line-spacing is out of whack.

A thought: I had always assumed that the readingLineHeight in Kobo eReader.conf was in units of ems? Is this not the case? (But ems is the only unit that makes sense).
ShellShock is offline   Reply With Quote