Posted on by & filed under book design, epub.

First, let’s be perfectly clear:

  1. The ePub specification supports embedded fonts.
  2. Embedded fonts are supported through use of the CSS2 @font-face rule.

Reading system support

As of September 2009, the following readers do support @font-face:

  • Adobe Digital Editions
  • Sony Reader

Implicitly, any reading device which uses the Adobe reading SDK should have the same behavior, though I have not confirmed this with actual devices.

The following readers do not support @font-face:

We haven’t added @font-face to Bookworm yet because web browsers started supporting it in a predictable way only recently (Firefox at 3.5, and Safari 3+). Internet Explorer has supported embedded fonts for some time but not in a standards-compliant manner. It’s confusing and unpredictable which font types will work and which won’t. (ePub Zen Garden does use some embedded fonts, but selecting those was difficult and not all web browsers will show them.) If you would like to contribute to the discussion of embedded font support in Bookworm, use the official ticket for that issue.

Note also that the ePub specification does not require @font-face support:

It is advisable for a Reading System to support the OpenType font format, but this is not a conformance requirement; a reading system may support no embedded font formats at all.

Why embed fonts?

There are two reasons:

  • Design: The book designer has chosen a particular font to reflect the style and content of the work
  • Content: The document has particular characteristics that require a specific font

I’m not going to address aesthetics here except to say that my general recommendation is to not embed fonts in an attempt to mimic the print edition. Not all fonts look good on screen, and not all are going to scale well to a greyscale eink reader or a 2″ smartphone display. If you want to embed a font to achieve a particular design, you must test the book on a variety of platforms.

However, there is one case in which embedding a font is critical: foreign languages. Adobe Digital Editions and the Sony Reader have poor out-of-the-box support for diacriticals and other foreign characters in their default fonts. You may also run into trouble with non-Roman character sets.

If your book is absent its accent marks or contains lots of w??rds miss?ng le??ers, you’re going to need to embed a font. In the next post in this series, I’ll show you how.

Tags:

12 Responses to “When to embed fonts in ePub files”

  1. Paul Topping

    Another area where font embedding is critical is for math in science, engineering, technical, and educational publications. In perhaps 50% of etextbooks, in other words.

  2. liza

    Paul,

    What goal does font embedding serve in that context? I can see why a book designer would include MathML or SVG to express equations (though that’s not font-related), and why a foreign language textbook might need an additional font, but why else?

  3. Paul Topping

    Liza,

    Equations rendered using real fonts, via MathML, SVG or whatever, have to count on the presence of those fonts on the reading system or characters will be missing. I’m surprised by your comment. Equations often contain unusual characters. Why wouldn’t they need font embedding?

    Paul

  4. liza

    SVG just draws lines, so it doesn’t require any fonts to do its job. I don’t know how MathML engines handle rendering.

  5. liza

    (This is based on my assumption that math rendering in SVG is based on drawing line primitives, but if specific math fonts are used, then I’m sure you’re right.)

  6. Peter Sorotokin

    SVG just draws lines, so it doesn’t require any fonts to do its job.

    Yes, but since text has to occupy some space in SVG its metrics must be well-defined. Otherwise labels can start to overlap or some unexpected gaps appear. And the only way to guarantee font metrics in EPUB/SVG is to embed fonts (PDF has a way to only embed metrics, but it is rarely used today).

  7. Peter Hofmann

    I hope some day it will be standart for any font reader to support embedded fonts and I also hope that font designers do their best to optimize as many fonts as possible to digital reading needs so we designers can make ebooks more attractive by choosing a font that reflects the impression of the readers experience to a degree, that a good printed book does.

    I was really dissappointed when I figured that eBooks in ePub format do have so many rules to follow and there are so few things that one can do to actually change the look and feel of the eBook to make it stand out. I hope that some day eBooks can really become as attractive to the recipients eye as printed books with all the additional possibilitys of interactive content.

  8. Liza Daly

    Bookworm happens to work if the user has the fonts on their machine already (as is likely to happen if you were the author of the ebook!) What we don’t do is actually extract the fonts from the ebook.

Trackbacks/Pingbacks

  1.  Times Emit: Apt’s links for September 2nd through September 16th
  2.  Bidirectional text in ePub : Threepress Consulting blog