01-25-2011, 07:20 AM | #1 |
Connoisseur
Posts: 88
Karma: 200
Join Date: Nov 2010
Location: Dortmund, Germany
Device: Kindle Paperwhite (10. Generation)
|
Removing embedded font/overwrite some css?
I have a collection of books and whoever created them embedded an ugly font for the whole book. I wanted to get rid of it so I ran an epub->epub conversion and not the fontsfiles are gone from the file, but the css file in the epun still contains a
Code:
.epub { display: block; font-family: "Font_71c88252-69ff-427d-9d08-e5662bb39245"; font-size: 1em; margin-bottom: 0; margin-left: 5pt; margin-right: 5pt; margin-top: 0; padding-left: 0; padding-right: 0; page-break-before: always } Code:
<style type="text/css"> ... @font-face { font-style: normal; font-family: Font_71c88252-69ff-427d-9d08-e5662bb39245; src: url(../fonts/LiberationSerif-Regular.ttf); font-weight: normal } ... </style> ... <body class="epub"> ... |
01-25-2011, 07:46 AM | #2 |
Wizard
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
|
You can specify extra CSS in the conversion settings (in the layout tab). This CSS should override any definitions that might still be in the file. Thus, if you were to add the .epub- style without the font specification, you should get an ePub formatted as previously with whatever default font the viewer uses.
|
Advert | |
|
01-25-2011, 11:39 AM | #3 |
Grand Sorcerer
Posts: 6,224
Karma: 16536676
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
You can use calibre's Tweak-epub on the converted epub to correct the CSS inside.
Open the .css file in a text editor. Find the part you posted: Code:
.epub {
display: block;
font-family: "Font_71c88252-69ff-427d-9d08-e5662bb39245";
font-size: 1em;
margin-bottom: 0;
margin-left: 5pt;
margin-right: 5pt;
margin-top: 0;
padding-left: 0;
padding-right: 0;
page-break-before: always
}
Code:
font-family: serif; If you've got more epubs with the same problem then putting the following in the ExtraCSS box on the Look&Feel page when you do the conversion should correct the problem during the conversion: Code:
.epub {font-family: serif} |
01-25-2011, 12:14 PM | #4 |
Connoisseur
Posts: 88
Karma: 200
Join Date: Nov 2010
Location: Dortmund, Germany
Device: Kindle Paperwhite (10. Generation)
|
Okay, I was looking for a way to get it to just disappear but I guess I could just replace it with the serif, thanks.
Oh, and I used the tweek ability to tell you what was left over, i was looking for a way to get rid of it in multiple files |
01-25-2011, 01:41 PM | #5 |
Grand Sorcerer
Posts: 6,224
Karma: 16536676
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Using ExtraCSS and a bulk-convert might work if your original epubs are similar enough. Although personally I never do bulk converts, certainly not for epub to epub which can be destructive if you get the conversion parameters wrong.
I don't know of any epub bulk-tweak options. |
Advert | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sigil + embedded font variants | troymc | Sigil | 6 | 10-17-2012 12:00 PM |
Can't delete embedded font | eosrose | Sigil | 1 | 08-16-2010 07:28 AM |
problem with embedded font | ericshliao | EPUBReader | 2 | 12-11-2009 11:04 AM |
Common font and/or embedded fonts... | Dahak | LRF | 6 | 06-28-2009 02:32 PM |
LRF with embedded font | igorsk | Sony Reader | 8 | 10-26-2006 09:08 AM |