View Single Post
Old 05-08-2021, 01:07 PM   #35
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,459
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by Tex2002ans View Post
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.

I don't know the reasoning, but we see this all--all--the time. It depends a lot on the training of the InDesigner, and also, what font files s/he is using. If you use Adobe's built-in (cloud) fonts, then you will get exactly that cruft--you'll get a span calling the "italic" (Font! Not simply italicization, right?).

The Indesigner has to be careful, in order to get what we think of as:

Code:
<i>italicized text</i>
Otherwise, you get the span calling the font FACE.

I've never bothered to experiment to find the "best" way, because speaking bluntly, we get files from all the corners of the globe. It's a miracle if we don't see 35-50 "character overrides" in a file, so my standards have changed, let's just say.

We had a file today that my Queen o'Quotes described as "not bad" (in INDD standards, right?). She then added "no paragraph styles, but other than that, pretty clean."

Sheesh, talk about lowered standards, for the love of heaven....

I agree that GDocs are actually worse.

Hitch
Hitch is offline   Reply With Quote