View Single Post
Old 02-23-2014, 10:09 AM   #27
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,304
Karma: 16800000
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
Quote:
Originally Posted by cybmole View Post
is there any slick way to do something similar for fixed line heights ?
they are a pain to do manually book by book: it's easy to miss one & they come both with & without closing ; so a simple regex will leave isolated ; in CSS file

e.g. there can be any/all of

line-height:1.2;
line-height:1.2
line-height:1.2em;
line-height:1.2em

scattered through out the various css classes
The idea of adding a line-height option to kobo_extra.css, similar to widows/orphans and @page, was discussed briefly (see Kobo Device Driver Update thread in the calibre/Devices subforum post #160 onwards), but was decided against, because it wouldn't be as harmless as the other two.

If it helps, I think you could refine your regex search a bit like this:
Code:
line-height:\s*1.2(em)?[;]?
(warning: my regex skills aren't the best)

Also, another tip, if you open the epub in calibre Editor and pull up the css file and Beautify it (purple daisy in Code View toolbar in v1.25), the ';' separator is added to all attributes, even the last one in the list. So that would make for less guesswork.
jackie_w is offline   Reply With Quote