View Single Post
Old 05-22-2010, 10:49 AM   #3
MSJim
Bookworm
MSJim began at the beginning.
 
MSJim's Avatar
 
Posts: 104
Karma: 26
Join Date: Sep 2009
Location: Central Georgia, USA
Device: PRS-600, Nook STR
I'm not sure about properly embedding the fonts. I created a folder in the root of the reader and copied the Georgia ttf fonts to it.
I've copied both the Style Sheet and Text file from the ePub file.

Style Sheet:
@namespace h "http://www.w3.org/1999/xhtml";
.MsoNormal {
display: block;
font-family: "Times New Roman";
font-size: 1em;
margin-bottom: 0.0001pt;
margin-left: 0;
margin-right: 0;
margin-top: 0
}
.Section {
display: block;
page: Section1
}
.calibre {
display: block;
font-family: "Georgia", serif;
font-size: 1em;
margin-bottom: 0;
margin-left: 5pt;
margin-right: 5pt;
margin-top: 0;
page-break-before: always
}
.calibre1 {
font-family: Georgia
}
.calibre2 {
font-family: Arial
}
a {
color: inherit;
text-decoration: inherit;
cursor: default
}
a[href] {
color: blue;
text-decoration: underline;
cursor: pointer
}



Text File:
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="Microsoft Word 11 (filtered)" name="Generator" />
<title>The quick brown fox jumped over the lazy dog’s back</title>
<meta content="http://www.w3.org/1999/xhtml; charset=utf-8" http-equiv="Content-Type" />
<link rel="stylesheet" href="../Styles/stylesheet.css" type="text/css" />
<style type="text/css">
@page { margin-bottom: 5.000000pt; margin-top: 5.000000pt; }
@font-face {
font-family: Georgia;
panose-1: 2 4 5 2 5 4 5 2 3 3
}
@font-face {
font-family: "Georgia";
font-weight: normal;
font-style: normal;
src: url(res:///Data/fonts/georgia.ttf)
}
@font-face {
font-family: "Georgia";
font-weight: bold;
font-style: normal;
src: url(res:///Data/fonts/georgiab.ttf)
}
@font-face {
font-family: "Georgia";
font-weight: normal;
font-style: italic;
src: url(res:///Data/fonts/georgiai.ttf)
}
@font-face {
font-family: "Georgia";
font-weight: bold;
font-style: italic;
src: url(res:///Data/fonts/georgiaz.ttf)
}
</style>
</head>
<body class="calibre">
<div class="Section">
<p class="MsoNormal">Times New Roman 12 pt.</p>
<p class="MsoNormal">The quick brown fox jumped over the lazy dog’s back.</p>
<p class="MsoNormal"><span class="calibre1">&nbsp;</span></p>
<p class="MsoNormal"><span class="calibre1">Georgia</span> <span class="calibre1">12 pt.</span></p>
<p class="MsoNormal"><span class="calibre1">The quick brown fox jumped over the lazy dog’s back.</span></p>
<p class="MsoNormal"><span class="calibre2">&nbsp;</span></p>
<p class="MsoNormal"><span class="calibre2">Arial 12 pt.</span></p>
<p class="MsoNormal"><span class="calibre2">The quick brown fox jumped over the lazy dog’s back.</span></p>
</div>
</body>
MSJim is offline   Reply With Quote