Tuesday, June 29, 2010

Fallback fonts in EPUBs

When you save a document as eBook in Atlantis, information about the fonts used to format the document text is saved to the eBook file. Accordingly, and for example, an eBook saved from a document formatted with "Times New Roman" will include a similar indication in its file. This is how eBook readers know which fonts they should use for the display of each eBook.

That sounds fine in theory, but in real life eBook readers will rarely display your eBooks with the fonts used in the original documents. This is because the required fonts are not always available on the eBook readers. So for example if "Calibri" was specified as the font to be used for the display of one of your eBooks, and the eBook reader does not have this font, it will have no choice but to display the eBook text with one of its default fonts. In such cases, your eBook might display quite differently from what your original intention was.

The first solution that comes to mind is to include all the required fonts in the eBook files, i.e. embed the fonts in the eBooks. Atlantis can easily embed fonts in eBooks – there is a dedicated option in the Atlantis "Save as eBook" window:

Unfortunately, embedding fonts not only makes the eBook files much bigger but also does not guarantee that the eBooks will display in the intended way in all eBook readers. This is because a few eBook readers (including the iPad) do not support font embedding. No matter how many fonts you embed in your eBook files, they will not be used by these eBook readers.

There is no perfect solution to this problem. But a partial solution is still possible. It will make your eBooks display closer to the original look on the various eBook readers: the next maintenance release of Atlantis – – will not only save the original font names to the eBook files but it will also include information about the corresponding generic font families. In practical terms, the following keywords will be associated with the font names, depending on which family they belong to: serif, sans-serif, cursive, fantasy, or monospace. In this way, the eBook readers will be able to choose the closest substitutes from the available fonts.

This change has already been included in the latest beta version of Atlantis Word Processor.

No comments: