View Single Post
Old 11-08-2010, 10:58 AM   #9
jswinden
Nameless Being
 
Quote:
Originally Posted by sherman View Post
Guys, deleting the css file in an epub is complete overkill if you just want to remove the font.

What you should do is explode the epub using calibre. edit the css file using your favorite text editor (yes, notepad will work, although I wouldn't recommend it) and search for and delete the following...

Any instances of
Code:
@font-face {
some font related styles
}
and
Code:
font-family: font-name(s);
The @font-face rules will generally be grouped together in the CSS, and you can do a simple find/replace using wildcards or regular expressions for the font-family rules.


Then rebuild the epub using calibre and you're done.
Yes!

Deleting the whole CSS file is risky. I've seen a LOT of ebooks that were formatted in ridiculously convoluted ways, mostly because whoever created the file converted it from another format like MS Word or some other non-ebook format. I've seen ePubs that had one <P> tag and hundreds or thousands of <br />, <span>, and <div> tags. If you delete the CSS from a book like that you will probably have a difficult to read book.

Last edited by jswinden; 11-08-2010 at 11:01 AM.
  Reply With Quote