fbpx

By Hufsa Tahir

Let’s talk about fonts. Most of us don’t spend much time thinking about them; we tend to use them for our book files, export to ePub format or upload to a conversion tool, and forget about them.  But for an eBook, they can be incredibly important. In some cases, they can make or literally break your book.

pic1

Why should you install your own fonts?

E-reading devices have their own small list of supported fonts already installed in them. So why is it worth it to actually embed a font file in your ebook’s ePub file?

Font embedding allows you to have complete control over how the text of your book will appear. Reading devices can then display your fonts instead of substituting in their own. Of course, a user can still choose to set their preferred reading font.

If you don’t mind what font your book is read in, you don’t need to embed a font.

If your ePub is in fixed-layout format, it is recommended that you embed a font to prevent differently sized device fonts from disrupting your layout.

A font substitution by a device is not a major problem for the average English novel. But non-English eBooks often require embedded fonts to render well across multiple devices, especially if they use characters not generally available in the Roman alphabet (e.g. Arabic or Chinese or Russian characters).

Most fonts will have some form of copyright prohibiting usage in ebooks without permission. You must obtain permission to embed these fonts in your eBooks, or stick to open source fonts (e.g. Google Webfonts). Check the font licence file (usually a .txt file that comes with a font file) if you are unsure.

 

Where are fonts located inside our eBook?

Open up the file browser of your computer (Ctrl + E on Windows, Cmd + E on Macs). Browse to where your ePub file is located. To look inside it, you’ll need to unzip it. On a Windows computer, you can do this simply by renaming the file extension from “.epub” to “.zip”, and then using a free unzipping program like 7zip to extract the files inside.

 

How to install fonts in your eBook properly

Adding a Font Using InDesign

Find an OpenType font (“.otf”) or convert another font type to OTF using Font Forge.

Install the font on your computer and use it in InDesign while you lay out your book.

When exporting as ePub, make sure to click “Include Embeddable Fonts” in the Export window. InDesign will then properly embed the font in your ebook.

 

Adding a Font Manually

Maybe you found a new font you want to use in an already existent ebook. Here is how to add that font in.

  1. Find an OpenType font (filename ending in “.otf”) or convert another font type using Font Forge.
  2. Add the font to the OPF file of your epub, anywhere in the <manifest> section.

<item id=”fontname” href=”fontname.otf” media-type=”application/opentype”/>

  1. Add the font to the CSS of your epub, and assign it to an element in your book

@font-face {

  font-family : GaramondBold;

  font-weight : bold;

  font-style: normal;

  src : url(GaramondBold.otf);

}

@font-face {

  font-family : GaramondItalic;

  font-weight : normal;

  font-style: italic;

  src : url(GaramondItalic.otf);

}

strong, b {

  font-family: “GaramondBold”, serif;

}

em, i {

  font-family: “GaramondItalic”, serif;

}

  1. Double-check that you installed it correctly by using an epub validator.

Your newly embedded fonts will now appear in your eBook!

 

Font Obfuscation

Font obfuscation is a way of mangling fonts to encrypt them, so a user can never remove them from an ePub file. InDesign automatically encrypts every font you embed during export. Unfortunately, this also comes with a risk of display errors when reading the ebook.

We highly recommend decrypting your fonts (if your font licence allows it) or using open source fonts that do not require encryption. It is not a necessary precaution, especially if you have opted in for DRM on Kobo Writing Life.

 

Resources for Fonts

eBook Architects

Google Webfonts

Finding Fonts for your Self-Published Book

How to Choose Typography for eBooks

Decrypting your fonts

%d bloggers like this: