Skip to content

Adding fonts

calebwaldorf edited this page May 8, 2019 · 7 revisions

Adding fonts

You can add your own fonts by including them in the _project/_fonts directory, which makes them accessible to all build types, or include them from remote sources in the _overrides.scss file if only needed for the Reader and Web builds. Tip: Check the license of the fonts you'd like to include as many type foundries will not allow you to distribute the files, which will happen if included in the _fonts directory.

Including in the _fonts directory

Move or copy font files into the _project/_fonts directory and reference them with @font-face declarations. The fonts will be automatically added to the builds.

Note: Not all e-readers support user-defined fonts. For iOS and macOS, it's necessary to add ibooks_specified_fonts: true to your project's config.yml for user-defined fonts to render.

Including in the _overrides.scss file

Import fonts from an external URL using the standard @import statement:

@import url("https://url/to/my-font.ttf");

Note: E-readers will not typically support loading remote assets, so while this method may be useful for the Reader and Web builds, it is sub-optimal for standalone readers.

Clone this wiki locally