View Single Post
Old 10-17-2013, 01:11 PM   #28
jswinden
Nameless Being
 
Quote:
Originally Posted by Katsunami View Post
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.
I agree it is old school and sloppy! You have to get your hands dirty to clean it up in an HTML editor or Sigil. MS Word is notorious for saving files converted into HTML like that, though Word does have alternate save options some of the eBook writers/editors/publishers still pick the wrong save as options.

Basically, if they use the STYLE tag with any formatting within the HTML tags, that is a no no. I also hate it when idiots use all P tags even for headings, and just change the style of the P tags' class(es) to match an H1, H2,...Hx. Bad form if you ask me.

Last edited by jswinden; 10-17-2013 at 01:15 PM.
  Reply With Quote