View Single Post
Old 02-25-2017, 02:58 AM   #9
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 stumped View Post
I am not aware of any way to automate the removing all explicit line height assignments from CSS ( which have to go in order for Kobo device sliders to work)
last time I looked ( some time ago I admit) the calibre conversion search replace regex rules did not apply to stylesheets.
You can set CSS properties to filter in the conversion settings Look & Feel > Styling > Filter Style Information. For example if you set a filter for line-height that will remove all line-height properties from the converted book and the device's line spacing slider will be sure to work (unless the publisher has used the font shorthand style, which is not common, but you could filter that as well.) There is also a firmware patch which achieves the same result.

The problem is that there are some situations where an explicit line-height is needed and doesn't interfere with the line spacing slider, such as setting the line-height of a raise-cap or superscript to zero to prevent it from messing up the line spacing of the containing paragraph. So you have to go back and manually add those in after the conversion.

I really don't think there is any general solution that will work for all books, although many will work for most books which might be good enough.

In the end it is like the problem of correcting spelling errors caused by poor scanning, there is no way to do it automatically that will work in all situations because sometimes the correct spelling can only be determined by reading and understanding the book.

The book I am reading at the moment (Seasons of Plenty by Colin Greenland, published by Gateway SF) has a character called Iogo (IOGO) which is misspelt in a number of places as logo (LOGO). However there are also a number of places where the word logo (LOGO) is used correctly, so I don't think it is possible for any algorithm to work out which are correct spellings of LOGO and which are misspellings of IOGO. I just have to go through manually and check each case.
GeoffR is offline   Reply With Quote