View Single Post
Old 05-03-2015, 12:20 PM   #47
GeoffR
Wizard
GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.
 
GeoffR's Avatar
 
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
Quote:
Originally Posted by cramoisi View Post
About the "My 15 line spacing values"

Quote:
Quote:
# Note that the kepub reader can have problems when the line spacing value is
# below about 0.85 (depending on the font family), resulting in the top line of
# text being cut off and the cut-off part showing at the bottom of the previous

I never noticed an issue but applied the patch anyway. Then i noticed this issue, but only after applied the patch, for all line-spacing slider positions before 50%. So i disabled this patch. Is anything I've done wrong ?
No problem, that is expected. The reason there isn't a problem without the patch is that without the patch the minimum line spacing is 1.0.

If you read epubs then you can use any line spacing value without a problem, but if you only read kepubs then you might want to change the replacement values in the patch to avoid the smaller ones that cause problems for the kepub reader. Which minimum value to choose will depend a bit on the font you use.

For example if you use the Kobo Nickel font, which has an extremely wide line spacing, then you might use a value of 0.75 without problem. If you use Georgia then you might have problems with values smaller than 0.85.

Here is a set of more conservative replacement values that should avoid problems with most fonts in kepubs:
Code:
# 15 values for replacement:
replace_float = 604A48, 1.0, 0.9
replace_float = 604B10, 1.05, 0.92
replace_float = 604B18, 1.07, 0.94
replace_float = 604B20, 1.1, 0.96
replace_float = 604A50, 1.2, 0.98
replace_float = 604B28, 1.35, 1.0
replace_float = 604A58, 1.5, 1.05
replace_float = 604B30, 1.7, 1.1
replace_float = 604B38, 1.8, 1.15
replace_float = 604A60, 2.0, 1.2
replace_float = 604B40, 2.2, 1.25
replace_float = 604B48, 2.4, 1.3
replace_float = 604B50, 2.6, 1.35
replace_float = 604B58, 2.8, 1.4
replace_float = 604A68, 3.0, 1.5
GeoffR is offline   Reply With Quote