Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > Kindle Formats

Notices

Reply
 
Thread Tools Search this Thread
Old 02-06-2015, 01:59 PM   #76
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,462
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 dgatwood View Post
If you mean my books, then no, it was straight US ASCII. No high ASCII characters except for a handful of entity-encoded bog-standard special characters like curly quotes, em dash, en dash, prime, double-prime, degree, and maybe one or two others.

My best guess is that the KF8 file that came out of KDP actually contained the embedded fonts, but in such a badly broken form that they effectively contained no glyphs.

On OS X, if you opened the file, it used the Mac font system, which correctly refused to open the broken fonts; the result was that it fell back to default fonts, hence it looked like the fonts had been stripped.

By contrast, Kindle Previewer on whatever platform the website uses (Linux?) is much dumber, and tried to use the broken fonts from the bundle, resulting in the missing glyph boxes.

Of course, this still raises the question of why an innocuous line of CSS asking for geometric precision in font rendering would cause KDP to spit out a MOBI containing corrupted font resources, but now that I know that it does, I've removed that line of CSS for now, and everything goes through cleanly, at least for me.
dg:

When you say:

Quote:
On OS X, if you opened the file, it used the Mac font system, which correctly refused to open the broken fonts; the result was that it fell back to default fonts, hence it looked like the fonts had been stripped.
...what do you mean? Do you mean, KindlePreviewer on a Mac? Something else on a Mac? Can you clarify?

Hitch
Hitch is offline   Reply With Quote
Old 02-06-2015, 10:20 PM   #77
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 Hitch View Post
dg:

When you say:



...what do you mean? Do you mean, KindlePreviewer on a Mac? Something else on a Mac? Can you clarify?

Hitch
Both Kindle Previewer on Mac and the normal Kindle reader app on OS X showed the book as normal text, but with fonts disabled.

My guess is that Kindle Previewer on OS X uses more native APIs than on other platforms. Alternatively, it could just be that there's a known bug in their font code that got fixed on OS X but not on whatever platform they're using for their server-side rendering. Or it could be that the OS X version of KP never got updated, and so never got broken by some regression.

BTW, it turns out that I lied earlier when I said that removing that line fixed all the problems. It fixed all the problems except for one: the micro-sized type in the SVG. That might be caused by font corruption, or it might be caused by something else. I'm still investigating.

Oh, and a random helpful tip: If you use the latest Kindlegen to build your books from an EPUB anyway, you can cut your upload time by about a factor of three by uploading the source EPUB instead of the MOBI.

Edit: scratch that last tip. You end up spending all the extra time waiting for processing on the server side. Apparently, their server's disk performance is abysmal.

Last edited by dgatwood; 02-06-2015 at 10:38 PM.
dgatwood is offline   Reply With Quote
Advert
Old 02-07-2015, 01:03 AM   #78
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
I found the problem with the SVG, and it's the same issue as in this thread. Someone at Amazon should seriously be subject to a clue bat for not realizing that it is completely wrong to convert px units to rem when it involves inline CSS within an SVG tag.

Horrible, hackish workaround applied, and I've also added information about the bug to the KF8 tips page.

Last edited by dgatwood; 02-07-2015 at 01:38 AM.
dgatwood is offline   Reply With Quote
Old 02-07-2015, 01:34 AM   #79
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
One more update; it turns out that the fonts weren't getting stripped out in my case. KindleUnpack v0.75 just didn't unpack the MOBI files correctly when used as a droplet. When I ran the script manually on the command line, all the files were there.

The font-family declarations, by contrast, were stripped. Why text-rendering:geometricPrecision would trigger font stripping is beyond me, but I've already concluded that I'll never understand the way the Amazon Kindle folks think....

But now I'm even more baffled why the online Kindle Preview displayed square boxes instead of glyphs afterwards, unless perhaps WebKit's handling of "text-rendering:geometricPrecision" causes the Kindle's built-in fonts to break their font handling code for some reason.
dgatwood is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom fonts K4 artcon Kindle Developer's Corner 2 05-11-2014 04:34 PM
Custom fonts Jellby PocketBook 20 12-31-2013 09:07 AM
PRS-T3 T3 fonts & custom fonts Phil_C Sony Reader Dev Corner 5 12-22-2013 02:34 PM
Stripping Fonts Rob Lister Calibre 2 10-05-2011 11:32 AM
Touch Fonts question (special characters in stock and custom fonts) levil Kobo Reader 20 09-23-2011 01:51 PM


All times are GMT -4. The time now is 10:58 AM.


MobileRead.com is a privately owned, operated and funded community.