ePub Typography

The days of being limited to only using web safe fonts online are over, but what does this mean for ePubs?

“In e-books, you have this tension, between the purity of a book’s layout as it was envisioned in print, and the flexibility that e-reading brings to a customer, by allowing you to increase font size, read books across multiple devices, and so on”, says Dave Limp, senior vice president of Amazon Devices

(fastcodesign).

The human reader and the hardware readers still maintain some autonomy in the rendering/appearance of fonts. As eBook publishers, we face limits imposed by hardware readers, licensing, software support and then in the end, the user themselves can choose to override our formatting. According to BISG most devices are at least 2 years behind the latest capabilities of the web.

Against these odds, do we resign ourselves to a default font and no paragraph breaks? Or do we experiment? (That’s a rhetorical question, we’re a PublishingLab – we experiment!).

This post is the first in a series of our experiments. Let’s get into details…

Font Considerations

Technical:

In eBooks the font file itself has to be embedded inside the eBook/ePub file. This means that every person who purchases or downloads the eBook has access to the actual font file (ebookarchitects).
If the font license doesn’t allow for free distribution you need to make the font unusable outside the ebook (a process called obfuscating).
InDesign does this automatically when an ePub is exported. If using other tools, you might have to use a manual method, some licenses include obsfucation instructions.
All Adobe fonts allow for embedding in pdfs, but not necessarily in ePubs.

Legal:

Check the font license to see if you have permission to use it in eBooks, that it is licensed to be embedded.
A simpler alternative is to use free, open license fonts like those found on Google Web Fonts.
Test on all devices you think your readers will use to make sure the font renders.

Formats:

In this excellent video Bram Stein explains the current state of web typography and which open type fonts render most consistently across platforms. This is partly why we’ve been on the hunt for .otf & .woff fonts for our ePubs.

TTF & OTF

True Type was developed by Apple and Microsoft in the 80s, it is an easier font to install on your system.
OpenType, a joint effort from Adobe and Microsoft, is the latest font format to be introduced. Like TrueType, these fonts contain both the screen and printer font data in a single component.

WOFF & WOFF2

WOFF is a good option because of it’s compression rate and since WOFF fonts are not directly installable on Mac and Windows casual piracy is a little less simple. This, therefore is the option favoured by most type foundries. Since WOFF2 is still a new format it is not yet widely supported so we are using an open license .otf.

You can convert font formats by using an online converter like this one from everythingfonts

Why Open Sans?

Type choices are subjective. A designer makes the decision based on the content, readability and intended impact of the book. As a general consideration, body text should be set in a typeface that has a large x-height which makes it easier to read and doesn’t tire the eyes over long passages of text. Headers can be set in more interesting fonts, but remember to consider the intention: do you want a text book with important subheadings set in a font that is so ‘creative’ it requires rereading to understand?

We chose Open Sans as the typeface for our latest publication for 3 reasons:

    • It has been designed and optimized for print, web and mobile interfaces
    • Open license: Open Sans is sourced through Google Web Fonts, which have a selection of fonts that allow free redistribution in any medium*
    • A good weight range from Light to Extra-Bold

Open Sans is a humanist sans serif typeface designed by Steve Matteson, Type Director of Ascender Corp. It includes the standard ISO Latin 1, Latin CE, Greek and Cyrillic character sets. Open Sans was designed with an upright stress, open forms and a neutral, yet friendly appearance. Optimized for web and mobile interfaces; its letterforms have excellent legibility.

Open Sans is licensed under the Apache License, Version 2.0
This license means we may reproduce and distribute copies of the Work or Derivative Works thereof in any medium with the provision that we include the Apache boilerplate copyright information.We’ve added it to the metadata for the epub as well as including it in our lib folder with the font itself.

*The Google Web Fonts library has different licenses, so please do take the time to read and implement any conditions.

Font Embedding

OpenType® fonts contain information in the actual font file that reinforces what is specified in the Adobe end user license agreement (EULA) and governs how these fonts may be embedded in electronic documents. Adobe has more information here.

Custom Fonts Used on ereaders

Amazon recently released it’s custom font Bookerly for Kindle, Kobo uses Nickel and Google Play Books uses the serif Literata.
Though you spend time creating an ePub that conforms well with your aesthetic and typographic choices, keep in mind that the readers have a degree of autonomy when it comes to reflow-able eBooks. The fonts mentioned above are all good choices, and it is worthwhile to test each one specifically with default fonts on your devices in order to see if there are any improvements you can still make to the structure of the content.

CSS Styling

To style your ePub with the fonts you’ve chosen you need to add @font-face rule to the top of the style.epub.css file. To point to the font you need to fill in src (source) with the name of the font + extension (.otf, .woff or .woff2) and the format, see below examples:

@font-face {
font-family:
src: url
font-weight:
}

src:url(Yourfont.otf)format(“opentype”);

Unicode

If the text in your ePub uses foreign characters or glyphs (i.e. a Greek or Chinese character) then you need to include a unicode-range in your css.
In our test eBook, we only had two Chinese characters and they render correctly in iBooks on the laptop and iPad. We still need to conduct further tests on different devices with CJK (Chinese/Japanese/Korean) fonts.

Chinese characters in ePub

Chinese characters in ePub as read in iBooks

Book Industry Study Group

Last but not least, BISG has produced the Field Guide for Fonts – an excellent resource for eBooks. Sign up to receive your own free copy.

This blog aims to keep you updated with all our eBook and hybrid publishing experiments at the PublishingLab and we welcome feedback and questions.

References

https://en.wikipedia.org/wiki/Web_browser_engine
http://www.guidingtech.com/9661/difference-between-epub-mobi-azw-pdf-ebook-formats/
http://blog.the-ebook-reader.com/2015/05/28/new-typesetting-and-layout-engine-coming-to-kindle-ereaders-and-apps/
http://www.lynda.com/Design-Typography-tutorials/Font-considerations-digital-documents/144769/158135-4.html
http://ebookarchitects.com

Recommended Reading & Listening

The mobilereads forum is free to join and constantly updated with useful information on ebook development, they also have a useful wiki. http://wiki.mobileread.com/wiki/Main_Page

eBook Ninjas podcast, Q&A with various eBook designers, particularly episode 106 which features a ‘dumb question amnesty’ about eBook production at the end.