Contents | Start | End | Previous: KB0081: Will my book have page numbers? | Next: KB0083: Can I add audio and video files?


KB0082: Why are fonts not working when viewed on an actual device?

See also:
What fonts can I use in my book?
Monospace code formatting is not working with Kindle enhanced typesetting
Working with embedded fonts in the Jutoh manual

Unless you're targeting a very specific device, such as a Kindle Paperwhite, you don't know what fonts will be available on the device. Not only that, if you fix the fonts within your ebook, your readers won't be able to customise the fonts. This is why by default, Jutoh outputs absolutely no font name information, leaving it up to the device and the reader to choose fonts.

However, if you really need to use specific fonts, there are several options:

  1. In your configuration, just turn on Generate generic font names. Now the ebook will use generic names such as sans-serif without being more specific, so for example if you use Arial in your ebook, sans-serif will be written to the ebook and an appropriate font will be chosen by the device. This option may still compromise customisation by the reader. Note that generic font names may not be taken into account by Kindle, and may actively cause the wrong font to be chosen.

  2. If you have unusual fonts that Jutoh can't interpret as sans-serif, serif and so on, you can tell Jutoh which fonts have which generic names via Preferences/Advanced. Add any sans-serif font names to the "Sans-serif fonts" option, and so on.

  3. Turn on both Generate generic font names and Generate font names, so the ebook will contain specific font names such as "Arial". To convert this into fonts that actually exist in the device, use the configuration option Font substitutions. Specify for example:

  4. Arial:Helvetica,Swiss,Lucida,sans-serif

    to turn references to Arial fonts in your ebook into a list of names, which will be searched by the device until it finds one that is available. For these fonts to be displayed, it may require the reader to find the option "Use Publisher Fonts", which he or she may not know about.

  5. Perhaps you only want some styles, such as headings, to be in a specific font; in that case, use the configuration option Styles with font names to specify a pipe-separated list of styles that should have font names associated with them. For example:

  6. Heading *|Title

    (where '*' means match any characters in order to include Heading 1, Heading 2 etc.)

    With this option, the device can still use its default font (which can be customised by the reader) for the majority of the ebook text.

    There is also a Styles with generic font names configuration option to only output generic font names (such as 'sans-serif') for specific styles, but Kindle only takes into account certain generic font names. Specifying 'sans-serif' may not have any effect unless accompanied by a specific font name, or it may choose the wrong kind of font (Kindle for PC, Kindle Previewer). In other words, for Epub, it's safe to specify a character or paragraph style that uses a monospace font, e.g. Courier New, in Styles with generic font names, but this may not work on Kindle.

    Just to complicate matters, using specific fonts for specific styles like this may work in Kindle Previewer and Kindle for PC/Mac, but the fonts may not show up when the book is distributed via Amazon. If this happens, you might try using embedded fonts as a workaround (see below).

  7. If you need a very specific font that isn't available on the device, you can use embedded fonts in the Jutoh manual. However, this makes the ebook less customisable for the user, and makes the ebook file larger. You also need to ensure you have the legal right to distribute the fonts you are embedding (free fonts are available, for example from http://dejavu-fonts.org). Even if the fonts are not installed on your machine, you can still use them in your book by virtue of the Font substitutions configuration option (so long as you also add the font files to the book resources). Font embedding is currently the only way to specify a monospace font for Kindle enhanced typesetting (otherwise, Kindle Previewer 3 will choose a non-monospace font).


Contents | Start | End | Previous: KB0081: Will my book have page numbers? | Next: KB0083: Can I add audio and video files?