Quote:
Originally Posted by jackie_w
Perhaps you didn't look hard enough. Every <span> with class="CharOverride-4" is italic. There are hundreds of those.
|
Hence the more surgical approach—deleting known useless style info (absolute positioning), then Calibre EPUB->EPUB conversion.
It's how I typically deal with really atrocious InDesign->EPUBs or Google Docs->EPUB. (If you think InDesign is bad, you should see Google Docs's code!)
Note: Like a few InDesign oddities I've been running across lately:
In some files, InDesign assigns an "Italic" font, but uses "font-style: normal" within the CSS.
So in a clean document, it should look like this:
Code:
<p>This is an <i>italic</i> word.</p>
but InDesign->EPUB may appear like this:
Code:
<p>This is an <span class="CharOverride-4">italic</span> word.</p>
Code:
span.CharOverride-4 {
font-family:"Minion Pro Italic";
font-style:normal; <----- See here. Should say italic.
font-weight:normal;
}
I'm unsure of how/why...
I've also run across similar in some DOCXs I've gotten from authors. Toxaris's EPUBTools doesn't handle these types of wrongly-styled fonts properly, but he is aware of the issue (and I believe he was working on it for the next release).
If you just mass throw away <span>s/fonts without looking closely, you'd also lose this sort of information.