I've registered to the forum specifically to post a question regarding font embedding and the KDP conversion from the Pits of Hell.
I've done an epub e-book with 2 embedded fonts in Sigil. These are Anonymous Pro (Regular, Italic & Bold) & Open Sans (Regular, Italic & Bold). Both are well known and widely used ttf fonts.
Now, in the epub, they work perfectly. When uploading my book to KDP... not so much. Just to be clear, this isn't the first e-book I've done and I've made sure - just like every time - that both the epub and the stylesheet itself are validated and contain no errors.
I converted the epub via KindleGen (KG), the latest version. The resulting mobi contains no errors, also. And right enough, after testing with Kindle Previewer (KP) and Kindle for PC (KPC) I was assured the custom fonts work in the converted mobi file.
I then set out to upload
that same mobi file to the KDP service. The file uploads, then KDP starts "converting it to Kindle format". When that was over, I downloaded the preview file (the "Download Book Preview File" option) and I get a mobi file that has
stripped fonts.
I should clarify what I mean by "stripped":
After I browse the inside contents of the KDP-served mobi file/archive, I found that the font files themselves are left intact, inside the Fonts folder.
Upon examining the stylesheet I found it has been butchered.
The @font-face declarations at the top of the stylesheet (before body and everything else) have also been left intact. They look like this:
Code:
@font-face {
font-family: "OpenSans-Regular";
font-weight: normal;
font-style: normal;
src: url(../Fonts/OpenSans-Regular.ttf) format("truetype");
}
But every subsequent font-family rule in the CSS has been
removed! The one in my <p>, <h1>, <h2> and other custom classes... gone. For example, my original class
Code:
.blok {
font-family: "Anonymous_Pro_B", sans-serif;
font-weight: bold;
font-size: 2em;
text-align: center;
}
now looks like this
Code:
.blok {
font-weight: bold;
font-size: 2em;
text-align: center;
}
I've tried just about every remedy offered in this thread, but not one seems to work.
So I would like to ask Hitch or someone of the experts to please answer just what the hell is KDP doing? Just what makes KG, KP and KPC leave and display the fonts, and KDP strip them? I'm at my breaking point regarding this issue. Can I even embed the fonts, or is it a fruitless effort doomed from the start?