Before embedding custom fonts, make sure you have obtained the necessary font-license.
Once obtained, go to Purchase > Download > Locate in your computer to find font files you wish to embed.
Step 1: Open your eBook in Sigil or similar software.
Step 2: In Sigil, right click “Fonts” folder present on the left side menu and select “Add Existing Files”. Select font files to be embedded. It is recommended to add TrueType Fonts for universal support.
Step 3: To check font type, locate the font file. Right click and select “Preview” or “Open“. You should see a window similar to below screenshot which will let you know the font type (TrueType/OpenType).
Step 4: Open content.opf file from Sigil. Add the following code to change href and id properties of <item> tag:
<manifest>…..
<item href=”Fonts/BaskervilleBold.ttf” id=”BaskervilleBold.ttf” media-type=”application/x-font-ttf” />
……
</manifest>
Step 5: Go to “Styles” folder present on left side menu and select the stylesheet. Add the following code and change the values as per your selected font file. Define @font-face for each file you are adding to Fonts folder:
@font-face {
font-family: “BaskervilleBold”;
font-weight: bold;
font-style: normal;
src: url(../Fonts/BaskervilleBold.ttf);
}
Step 6: Now simply use the declaration of font-family, font-weight and font-style in whichever class you wish to embed fonts.
.head{
font-family: “BaskervilleBold”;
font-weight: bold;
font-style: normal;
font-size: 3em;
}
Step 7: Save your file to see custom fonts in your eBook.
This is author biographical info, that can be used to tell more about you, your iterests, background and experience. You can change it on Admin > Users > Your Profile > Biographical Info page."
About us and this blog
We are a digital marketing company with a focus on helping our customers achieve great results across several key areas.
Request a free quote
We offer professional SEO services that help websites increase their organic search score drastically in order to compete for the highest rankings even when it comes to highly competitive keywords.
More from our blog
See all postsRecent Posts
- How to publish an eBook on Kobo February 26, 2019
- How to publish an eBook on Apple February 26, 2019
- Publishing Playscripts as an eBook May 5, 2016