View Single Post
Old 10-17-2013, 11:21 AM   #24
Katsunami
Grand Sorcerer
Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.
 
Katsunami's Avatar
 
Posts: 6,111
Karma: 34000001
Join Date: Mar 2008
Device: KPW1, KA1
Quote:
Originally Posted by jswinden View Post
It could be as simple as sloppy HTML/CSS. I've modified several eBooks in the past that looked like they were created by MS Word then incorrectly converted to HTML. In these books, rather than use simple and effective CSS class and heading tags to assign formatting, they use span tags on nearly every line of HTML. These kind of sloppy files are a mess and a PITA to work with. I wouldn't be surprised if calibre just choked on them.
If a book sets the font on every paragraph, Calibre will be unable to embed a font. It will embed it allright, but the CSS on each paragraph will override it.

The only way to fix that is to open the book in Sigil (if it's not an EPUB you must convert to it first, further messing up the code), and then use a regular expression to rip all the font-family properties out of the <p> tags.

Maybe the book is even using <font> tags...

Coding like that is really old style. If you do it on a website nowadays, you'll probably get ridiculed, fired, stoned, or shot.
Katsunami is offline   Reply With Quote