View Single Post
Old 02-02-2015, 02:00 AM   #147
dgatwood
Curmudgeon
dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.
 
dgatwood's Avatar
 
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
Quote:
Originally Posted by quiris View Post
The algorithm that I use in my epubQTools (--myk-fix option) and I can confirm that it works in many many books prepared by this tool.

To avoid font stripping problem:
1) The main font must be set up for body tag.
2) The main font must not be used in other selectors except above body tag.
3) Use other fonts according your wishes
4) CSS style file with above styles must be linked with every XHTML file in ebook.

I made my CSS follow those rules. It still gets all the fonts stripped. I tried ensuring that all font styles appear only in the KF8 slice by wrapping them in an @media query. I even tried ripping out every fallback font that wasn't included in the EPUB book.

So there's definitely more to it than this. Perhaps the font stripping is triggered if any selector causes a font to be reset to the same font value that it was set to before, regardless of whether the font is the main font?

Perhaps they're using a CSS parser that's even more broken than the nightmare that KindleGen uses?

Compounding the problem is the fact that it is taking longer and longer to submit each file. I'm submitting test books with nothing but fonts, and they're taking more than twenty minutes each.... And it's only their site that's slow, so it isn't a problem on my end.


Quote:
Originally Posted by KevinH View Post
So they must then be unpacking the kindlegen using their own unpacking code, rebuilding an epub to result in font files being lost?
That's exactly what they're doing. When you create one sans-source and upload it, you can see the custom-built EPUB as the "source" if you extract the resulting MOBI file. Blech. For all the effort they expend trying to "fix" content that probably isn't broken even if the submitter went out of his or her way to make it hard for them to do so, you'd think they would at least have a lightweight escape hatch, where the submitter could say, "I know what I'm doing," and get KDP to pass the content through unadulterated.

For that matter, IMO, the threshold should probably be the fact that somebody submitted a MOBI file to begin with, instead of one of the more generic formats... but I digress.
dgatwood is offline   Reply With Quote