How to Create a Fixed Format Ebook (Part 4): Embedding Fonts

fixed_format_font_example

So far in this series, I have covered how to setup a fixed format ebook, how to add images, and how to place text. In this post I’ll go over how to embed fonts, to make your ebook even more unique. You can use this trick for both fixed format ebooks and reflowable ebooks.

The first thing I want to mention is that you can embed any font you like in your book, so long as you have the rights to use the font.

The easiest way to embed the font is to upload it to Sigil, which you can do by adding existing files to the Fonts folder.

fixed_format_embed_font In the OPF file, you should see something like this:

<item href=”Fonts/SMILAGE_.otf” id=”SMILAGE_.otf” media-type=”application/vnd.ms-opentype” />
under the <manifest>

I’m using the font SMILAGE as an example, so whatever font you choose will have a different name.

Next you’ll need to write some rules in your CSS stylesheet so your ebook will include the new font. Start with “@font-face”. Here is an example using the SMILAGE font:

@font-face {
font-family: “SMILAGE”;
font-style: normal;
font-weight: normal;
src:url(“../Fonts/SMILAGE_.otf”);
}

fixed_format_fontYou can use the exact same code I used, just make sure to change the file and font names. You can also use it as a starting point, and change the style and weight to whatever you want.

Last, you’ll want to create a style in your CSS that actually uses the embedded font. In my example, I created a paragraph style:

p {
font-family: “SMILAGE”;
font-size: 38px;
letter-spacing: 2px;
position:absolute;
text-align: left;
color:#8A4117;
line-height: 150%;
}

fixed_format_paragraph

Since I used the p tag, every paragraph in the book will use that font, size, letter-spacing, etc. You have the option of adding, deleting, or editing any of those styles for your own ebook.

If you follow all those steps, your text will look like the text in the first image of this post.

I think this helps give my ebook more of a children’s book feel.

Next post, I’ll cover how to add read aloud capabilities to your fixed format ebook. This only works for books sold on Apple (basically iPad), but it’s a great feature that can highlight words as they are narrated.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s