Thread: Embedding fonts
View Single Post
Old 12-22-2009, 05:17 AM   #3
erik5000
Member
erik5000 began at the beginning.
 
Posts: 15
Karma: 12
Join Date: Nov 2009
Device: sony prs600
sure you can. You can put them anywhere in the directory structure, as long as you tell the .opf file where they are.
Use .otf fonts.
Here is a CSS entry in one of my epubs (the font file is in the fonts directory):

@font-face {
font-weight: bold;
font-style: normal;
font-family: "MyriadProBold" ;
src: url(fonts/MyriadPro-Bold.otf) ;
}
h1
{
font-size:20pt;
margin-bottom:20px;
font-weight: bold;
font-family: "MyriadProBold" ;
text-align: right;
}

This is the entry in content.opf:

<item id="MyriadProBold" href="fonts/MyriadPro-Bold.otf" media-type="application/vnd-ms-opentype"/>
erik5000 is offline   Reply With Quote