View Single Post
Old 07-12-2013, 09:17 PM   #1
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
Adjustable line spacing not proportional to font size [solved]

Does anyone know how the line spacing set via the slider on the font menu relates to the line-height CSS directive, if at all?

If I set the line spacing to minimum on the sider, readingLineHeight=1.3 is set in the device's configuration file. So I thought this would mean the same thing as if I had set line-height:1.3 in the CSS.

But it seems Kobo's readingLineHeight and the CSS line-height value only correspond when font-size:medium is active in the book's CSS. If I have the main text set to font-size:xx-large, then the lines overlap with the slider at minimum (i.e. line-height is less than 1.0), and if I have it set to font-size:x-small then the lines are about double spaced.

However if I set line-height:1.3 in the books CSS then the line height remains proportional regardless of the font-size, the lines are never overlapping or double-spaced.

So this means that the line spacing set via the font menu slider is not changing the line-height in the same way as setting it in the CSS. Hence my question: how to they relate?

Personally I find the minimum slider-set line spacing (readingLineHeight=1.3) comfortable if the book is using a medium font-size, but some books, for reasons I cannot figure out, use font-size:small or x-small for the main text, which causes the actual line spacing to appear proportionally much larger.

This also means that scaling up all the font-size directives in a book's CSS (medium to large, small to medium, etc.) would make the minimum slider-set line spacing much closer, which would probably be more useful (because the slider-set range would be shifted, it could be set near the middle of the range with room to adjust both ways, instead of always at the minimum).

Edit: The cause of the problem was exactly as tshering speculated in post #2. See post #31 for a firmware patch that fixes the problem.

Last edited by GeoffR; 04-18-2014 at 01:43 PM.
GeoffR is offline   Reply With Quote