View Single Post
Old 04-01-2012, 02:37 PM   #306
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,899
Karma: 146918083
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by EatingPie View Post
File Under: Asking for the Moon...

It would also be great if you posted code snippets (the CSS entry and then a single use)! That may be better in the developer section, but it would be great to see what you did for us wannabe epub hackers.

-Pie
I removed all of the font-family code from the CSS that referred to Times Roman.

Here are the parts of the CSS code that I've modified.

Code:
@font-face {
font-family: Garamond;
font-style: normal;
font-weight: normal;
src: url(fonts/AGaramondPro-Regular.otf);
}
@font-face {
font-family: Garamond;
font-style: italic;
font-weight: normal;
src: url(fonts/AGaramondPro-Italic.otf);
}
@font-face {
font-family: Garamond;
font-style: normal;
font-weight: bold;
src: url(fonts/AGaramondPro-Bold.otf);
}
@font-face {
font-family: Garamond;
font-style: italic;
font-weight: bold;
src: url(fonts/AGaramondPro-BoldItalic.otf);
}
@font-face {
font-family: AGSC;
font-style: normal;
font-weight: normal;
src: url(fonts/AGaramondPro-SC.ttf);
}
@font-face {
font-family: Lumos;
font-style: normal;
font-weight: normal;
src: url(fonts/Lumos.ttf);
}
@font-face {
font-family: "Felt Tip Roman";
font-style: normal;
font-weight: normal;
src: url(fonts/FeltTipRoman.ttf);
}
@font-face {
font-family: FGTCE;
font-style: normal;
font-weight: normal;
src: url(fonts/FranklinGothicLTExtraCondensed.ttf);
}
@font-face {
font-family: FSL;
font-style: normal;
font-weight: normal;
src: url(fonts/FreestyleScriptLT.ttf);
}
body {
  font-family: Garamond;
  widows: 0;
  orphans: 0;
  margin-top: 0;
  margin-bottom: 0;
  margin-left: 0;
  margin-right: 0;
  text-align: justify
}
p {
text-indent: 1.2em;
margin-top: 0;
margin-bottom: 0;
}
h1, h2, h3, h4, h5, h6 {
margin-top: 0;
margin-bottom: 0;
font-family: Lumos;
font-weight: normal;
text-align: center;
text-indent: 0
}
h1 {
font-size: 260%;
margin: 0
}
h3 {
font-size: 100%;
margin: 0
}
h5 {
font-size: 150%;
margin: 0
}
h2 {
font-size: 200%;
margin: 0;
}
h4 {
font-size: 90%;
margin-top: 20px;
margin-bottom: .5em
}
.letter {
font-family: "Felt Tip Roman"
}
.letter2 {
font-family: FSL
}
.headline {
text-indent: 0;
text-align: center;
font-family: FGTCE
}
.drop {
font-family: Lumos;
float: left;
font-size: 3.4em;
margin-right: 0;
font-weight: normal;
line-height: .7em;
margin-top: .05em
}
.sc {
font-family: AGSC
}
.title {
font-size: 260%;
font-family: Lumos;
font-style: normal;
font-weight: normal;
text-indent: 0;
margin-left: +0;
margin-right: +0;
margin-top: 15%;
margin-bottom: 1%;
text-align: center
}
Where there were pseudo-blockquotes that needed a change in the font style, I've remove any italics and removed the pseudo-blockquote code then put in a code like <blockquote class="letter"> and then ended the section with </blockquote>.

The sc style is for the smallcaps. So in the XML, you have to find every instance and convert the uppercase to lowercase.

Putting in the code for the fonts was quite easy. If anyone needs to see the actual code in the XML files, I can dig it out to post.

If you are using a Kobo reader, the font-family code in the body style will not work. You can try and move it to the p section of the CSS and see if that catches all the instances needed.

Last edited by JSWolf; 04-01-2012 at 02:42 PM.
JSWolf is online now   Reply With Quote