bluelake publications

digital | content | creation

Kindle Digital Publishing and custom font embedding

I’ve spent an inordinate effort in attempting embedment of a custom font in various e-books at KDP in recent weeks.

It’s not exactly a simple process but once you understand the principles it’s kind of 1-2-3.

A note here, I’m doing a basic format of my ebooks in the Mac program Pages with its export as an .epub function which goes much of the way to getting the book translated into XHTML. I’m using the program Calibre for my ebook editing, which once you learn, is quite magnificent to use, kinda like your usual word processing but being able to view the XHTML code and the produced document simultaneously. You work on the XHTML side but get an instantaneous update and there’s a button you click to check whether the markup is fully compliant. Plus you can compare your current markup to any step since you last manually saved, all the changes highlighted. There’s a bit to do to strip out all the unnecessary classes that Pages comes up with, simplifying the markup as much as possible. Now I have my basic CSS stylesheet worked out, to get consistency between my books. Actually you don’t need all that many classes, I’ve got a standard set of five: chapter title; table of contents; image; the dedication and copyright, ie, just centred text; indent for quoted text or lists; plus the usual HTML italic and superscript. Calibre has powerful search and replace tools that really crunch this speedily. Other than reducing the complexity of the CSS the major thing with the translation to the ebook is to sort out the Table of Contents, not so hard when the process is basically automated but there are a few decisions to make in that department. Once you have done a few books it’s pretty mechanical. I’ve now published, err, six.

But back to the font embedding. Here’s my 1-2-3 Guide.

1. Embed the font in your e-book, Calibre adds all necessary code to the Manifest automatically.

<item href="Fonts/Abel.ttf" id="Abel" media-type="application/x-font-ttf"/>

2. Do the font face thing in your CSS.

@font-face {
  font-family: "Abel";
  font-style: normal;
  font-weight: normal;
  src: url(../Fonts/Abel.ttf);

3. Add the font to a CSS class, I’m just wanting the single case for my chapter headings.

.title {
  color: #3c0;
  font-family: "Abel", sans-serif;
  font-size: 1em;
  page-break-before: always;
  text-align: center;
  text-indent: 0; 

4. Add the class to the chapter title markup on each page.

<p class="title">Day 21 | Cannibal Gorge Hut, somewhat hungry</p>

Okay, it’s a 1-2-3-4 type of thing but that doesn’t seem so difficult.

Only, it hasn’t worked.

Well, eventually I organised the process to see it working, mostly, in the KDB preview, ie, when you have uploaded the ebook to the website, and even in a file you can download the font is distinctly embedded.

Pop on the public side in the Amazon store and it isn’t such a happy sight. The CSS is mostly conveyed, colour, size, are ticked, but the embedded font, well, no appearance your honour.

To say I’ve worked on this extensively, from every direction, would be right. What else would I be doing for the last five weeks?

I wrote a long technical e-mail, with three specific questions to KDP support and get a generic, non-technical, frankly dumb response. First they say follow the official KTP Guidelines, but really, such an important aspect of ebooks they are vague at best, incoherent even, not like my 1-2-3-4 system. Then they say get a professional to resolve it, ha, I thought I was one.

Google, it’s actually surprisingly sparse in useful stuff, not offering up anything much of help although after digging through a few pages I find a few instruction sets.

Yes, I’m doing things right, 1-2-3-4 is the way to go.

Next step, to the online forums, the huge one is MobileRead, but there’s not so much in recent times that’s applicable. I have an absolutely straightforward case, I’m trying to get a single font embedded for my chapter titles. This hasn’t seemed to be a problem for most other people.

I post a new thread. I post more or less the same technical stuff that went to KDP with the same three specific questions.

Someone tells me no one should ever need a custom font, the Henry Ford approach, you can have any colour you want, as long as it is black. This is not exactly helpful. I guess she’s a great believer in Times New Roman.

Others say it’s hard to do. Generally adding fonts “isn’t recommended”, the idea with ebooks is that users should choose their own font. But I’m not wanting to dictate a particular body font, who cares about that. Then again I’m not writing a novel, surely I should be up to get my chapter headings in a sans-serif font. It is 2014 after all.

I disagree with this necessarily hard bit. Markup is just markup, once you understand what to do it’s really paint by numbers, and it’s not particularly difficult to get your head around basic XHTML and CSS.

On these forums there plenty of people, I’ve-got-the-knowledge-and-I’m-not-willing-to-share types, maybe they think that if they tell others they will lose income, perhaps they are just power trippers. Somewhat condescending.

Eventually someone knowledgeable, Ie, has been doing this stuff professionally for years, engages and I try some different suggestions, change to various sans-serif fonts, change to TrueType then back to OpenType fonts, a few different bits and pieces.

Each time there’s Relief, Hope, Expectation and then, sadly, quite quickly, Despair.

After five weeks of frustration now I find it’s not just me. One of the professionals has stated that KDP has adjusted their processing and currently everyone’s fonts are being stripped, even the experts’ own.

Is that progress? At least now the heavy hitters are being affected.

A glitch. Hopefully things will be sorted pronto if other people are noticing this non-embedment thing.

author | GJ Coop | posted | 09 August 2014
← a brief extract from zzOz E-books | All you really need to know about formatting for the Amazon Book Store →