![]() |
#121 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
|
Quote:
Dale |
|
![]() |
![]() |
![]() |
#122 | |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,703
Karma: 5703586
Join Date: Nov 2009
Device: many
|
Hi Peter,
I examined your not-working example and can see that they did just completely strip the font out. The build.log embedded in the src shows the error was that your custom font is actually missing (can't be found!) And if you look at the embedded src archive you can see the font file is not there. So the problem is in the KDP process but it occurs before they run it through their special version of kindlegen. So they must be unpacking and preprocessing the submitted epub in some way before processing it and when they put it back together they drop the fonts for some minor error. If you submit a mobi, they must do the same process to its embedded source. Have you tried submitting a mobi generated by kindlegen where you use the -dontaddsouce option? This should prevent them from preprocessing an epub and hopefully prevent the issue. Also after reading what you wrote, I am betting, the issue is not the amount of text but which style sheet is linked-in the most often. I am guessing, whichever one is linked-in more often becomes the "main" sheet and as long as the main sheet does not have an issue and the font urls are there, embedding will be more likely. You could try subsetting all of the truly embedded fonts and urls into their own sheet and link that sheet into all documents, and moving the non-embedded font-face to it own sheet and only linking to it when necessary. All of what I said is at least not inconsistent with what you said in your post. My theory is some preprocessing code somewhere is looking for a "main" sheet and the main sheet must be absolutely perfect otherwise pieces of it are ignored and the embedded fonts are never found. And interestingly, a specific metadata element is added when embedded fonts are included: 528 : 'override-kindle-fonts_(528)', When fonts are embedded this metadata item is set to "true". What is interesting here is that it literally says the the kindle device should "override" its fonts not "augment" them. So something else to try is to also embed a Palitino font as a test to see what if any impact it has an the problem (so all named font faces with specific (non-generic) names are embedded). If anyone knows anyone involved at Amazon, would you please check if they pre-process submitted epubs in any way before passing them to their internal kindlegen for KDP, cause its build log indicated that the font itself never made it and that was why it was "stripped-out". I will keep looking but I don't use KDP and using kindlegen 2.9, all works as expected so I can't debug the process first-hand. Hope something here helps. KevinH Quote:
Last edited by KevinH; 11-11-2014 at 10:30 PM. |
|
![]() |
![]() |
![]() |
#123 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,575
Karma: 145863177
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
You just specify the font size as 3em in H1 and do not specify the font family as it will already be Arial because it was selected in the body.
|
![]() |
![]() |
![]() |
#124 | |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 195
Karma: 42216
Join Date: Oct 2013
Location: Poland
Device: Kindles: KOA1, KV
|
Quote:
![]() body is ancestor of h1 in your example so you can style it according to my recipe in such way: Code:
body {font-family: Arial; font-size: 1em} h1 {font-size: 3em} Code:
body {font-family: Arial; font-size: 1em} h1 {font-family: Arial; font-size: 3em} Last edited by quiris; 11-12-2014 at 02:05 AM. |
|
![]() |
![]() |
![]() |
#125 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 195
Karma: 42216
Join Date: Oct 2013
Location: Poland
Device: Kindles: KOA1, KV
|
KevinH, embedded or not embedded source epub in MOBI is irrelevant. Font stripping will be occurred in both cases.
|
![]() |
![]() |
![]() |
#126 | |
Bookmaker & Cat Slave
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
My experience with the MOBI from hell was not affected by ensuring this method of setting the heading. I'm going to pull it out this weekend, if I can, and stare at it some more, to see if I can find anything else to add to the discussion. I can't confirm whether embedding the ePUB or not makes a difference. I do know some folks at Amazon; but they have frankly not been helpful on this topic. As with some others, they've asked us for help--not the other way around. However, Kevin, I'll see if I can get an answer to that specific question. Assume it won't be quick. (On their parts--not that I shan't write quickly). Hitch |
|
![]() |
![]() |
![]() |
#127 | |||
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 195
Karma: 42216
Join Date: Oct 2013
Location: Poland
Device: Kindles: KOA1, KV
|
Quote:
Quote:
Quote:
|
|||
![]() |
![]() |
![]() |
#128 | |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,703
Karma: 5703586
Join Date: Nov 2009
Device: many
|
Hi,
Quote:
So they must then be unpacking the kindlegen using their own unpacking code, rebuilding an epub to result in font files being lost? Your more than 50% rule to determine the major body font seems to be consistent with what Peter is seeming, too. Why can't anyone from Amazon be simply given a valid kindlegen generated "working" mobi and epub, and pass it through its own process to watch the fonts being stripped and so easily reproduce the problem on their own and get it fixed. Based on some of the posts on the web, this problem has existed literally for years! KevinH |
|
![]() |
![]() |
![]() |
#129 |
temp. out of service
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,815
Karma: 24285242
Join Date: May 2010
Location: Duisburg (DE)
Device: PB 623
|
|
![]() |
![]() |
![]() |
#130 | |
Bookmaker & Cat Slave
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Hitch |
|
![]() |
![]() |
![]() |
#131 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,703
Karma: 5703586
Join Date: Nov 2009
Device: many
|
Hi,
Just for the record, here is a snippet from the not-working kindlegenbuild.log which only differs from the working version by one linked in style sheet: Code:
W-amzn_cap_enabled|-locale|EN|-amzncreator|dtc-epub|-tempfolder|/var/tmp/dtfc/KindlegenTempFolder/298509830| V2.9 Linux 6 Info:I9026:option: (hidden) amazon creator tool or pipeline <snip> Info(prcgen):I1002: Parsing files 0000089 Warning(prcfile):W14028: Following file does not exist : PopulaireLightEmbed.ttf Info(cssparser):I10006: Invalid syntax for url(), ignoring the URI. "style.css" Info(cssparser):I10006: Invalid syntax for url(), ignoring the URI. "story.css" <snip> KevinH |
![]() |
![]() |
![]() |
#132 | |
Bookmaker & Cat Slave
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
this correlates with what we have seen; when the KDP-build fails, the font files are stripped, in toto, from the final .mobi file. Not some, or only one; all the font files get nuked. Is there anything I could provide to you, privately, that might help you? Hitch |
|
![]() |
![]() |
![]() |
#133 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,703
Karma: 5703586
Join Date: Nov 2009
Device: many
|
Hi,
I'm afraid not. I was hoping for some additional error messages in the kindlegen build log to provide hints as to what the underlying issue really is. Unfortunately, there seems to only be the log built *after* the fonts have been stripped. So unless KDP provides you with some additional information about what errors they are seeing it or why the fonts were stripped, we are stuck coming up with theories and then testing them via KDP runs. I am truly surprised that submitting a kindlegen ebook without added source runs into the same problem. Is there one website or set of reference that describes the rules you and others have devised by trial and error to try to maximize the chances of success with an embedded font? There may be some overlap among them that might hold a clue. Other than that we are stuck debugging a black box. The ones that fail, remove the font so nothing useful is generated by their special kindlegen run. The ones that succeed have no problem. Peter's test case is an interesting one in that changing just one more xhtml file from linking in one stylesheet to a very very similar stylesheet is enough to break the process, eventhough both stylesheets are valid and very nearly identical. And there does seem to be a 50% rule of some sort in play here, but it is not a max text limit, just a proportion limit. If Peter adds extra pages using the one style sheet, he can add the same number of extra pages using the other, and the fonts will stay, but if he changes just one more to use story.css instead of style.css, all fonts are stripped. So one of the differences between the two css sheets is somehow involved in this 50% rule, but I am still not sure which ones as there were a small handful of rules in style.css that did not exist in story.css. If Peter is right and it is the use of the Palatino font face, then it must in some way be related to how it is being used. I will keep looking. Take care, KevinH |
![]() |
![]() |
![]() |
#134 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,703
Karma: 5703586
Join Date: Nov 2009
Device: many
|
Hi Hitch,
After re-reading the complete thread once more, I was struck by this post by quiris: https://www.mobileread.com/forums/sho...3&postcount=67 I think Peter's case is exactly this. From the PD/KDP response, the preprocessing step is being referred to as "font-fix" tool and when it detects elements with default fonts being overwritten/changed it acts to "strip fix" all embedded fonts. The problem seems to be when they calculate an implied "main" font based on the total text covered by that font and then implicitly apply it to all body tags, and if that results in any element that should have been a default font changed, they strip all embedded fonts. My guess is they would do the same thing if an explicitly set body font did not match the main font as measured by amount of text covered. This I think is captured by Peter's use of Palatino on a p tag - when it covers more than 50% of the text of a book it becomes the "main" font according to the font-fix tool and therefore an implied body font, and that results in some element changing from default to Palatino, which in turn is why they throw out all embedded fonts. So, in short, having an implied body font that somehow changes the expected font of some other element, results in all fonts being tossed. A quick and dirty python script could in fact calculate the "main" font in a fashion similar to their "font-fix" tool to help detect this condition before submission. Anyway, that seems to be consistent with all of the evidence in this thread related to having all embedded fonts stripped out (not just one or two flakey fonts). Hope this helps, KevinH Last edited by KevinH; 11-14-2014 at 03:00 PM. Reason: fix typo |
![]() |
![]() |
![]() |
#135 |
Bookmaker & Cat Slave
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Kevin:
On my iPad now, so will have to post back later, but, I can say with certainty that this is not what's happened with some of our issues. The Papyrus, certainly—that couldn't have been remotely confused with a "main" or body font. The usage was scant. Ditto the infamous Arial plus two goofy fonts debacle. FWIW. Hitch |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Font Embedding? | teh603 | Writer2ePub | 75 | 01-08-2013 07:57 PM |
Font embedding | sachin | Sigil | 36 | 03-30-2012 03:26 AM |
Font embedding | sachin | Sigil | 3 | 03-21-2012 09:19 AM |
Do I need a font license if all I'm doing is referring to the font (not embedding)? | Stodder | Workshop | 21 | 04-21-2011 04:19 AM |
Special chararcters on the iPad or why does Apple not support Font-embedding? | georg3200 | ePub | 13 | 10-06-2010 10:32 AM |