View Single Post
Old 01-03-2011, 09:04 AM   #43
sbtx99
Zealot
sbtx99 once ate a cherry pie in a record 7 seconds.sbtx99 once ate a cherry pie in a record 7 seconds.sbtx99 once ate a cherry pie in a record 7 seconds.sbtx99 once ate a cherry pie in a record 7 seconds.sbtx99 once ate a cherry pie in a record 7 seconds.sbtx99 once ate a cherry pie in a record 7 seconds.sbtx99 once ate a cherry pie in a record 7 seconds.sbtx99 once ate a cherry pie in a record 7 seconds.sbtx99 once ate a cherry pie in a record 7 seconds.sbtx99 once ate a cherry pie in a record 7 seconds.sbtx99 once ate a cherry pie in a record 7 seconds.
 
Posts: 137
Karma: 1826
Join Date: Nov 2009
Location: Texas
Device: Kindle 3 Wifi; Red PRS-650; iPod Touch; Android phone
Quote:
Originally Posted by ander111 View Post
Hi everybody,

Okay, I've successfully flashed my firmware, created font folders in my 'epub' folder, and uploaded the corresponding font sets to them. But I've been trying for hours to get UserStyle.css to work.

I've tried several fonts, and the only one that works at all is Cambria—but all text appears bold.

I've used the exact same format with Droid (which didn't work following the flash—isn't it supposed to?), Georgia, and Verdana, but the lame Sony font continues to appear.

Also, if the firmware flash adds a "userStyle.droid.css" file on the Reader, don't we have to add a corresponding file for each other font? Or does only Droid require it for some reason?

Here's my UserStyle.css below. Will you please tell me what I'm doing wrong? Thanks!

Code:
@font-face {
  font-family: "Cambria";
  font-weight: normal;
  font-style: normal;
  src: url(res:///Data/epub/FONT/cambria/cambria.ttf);
}

@font-face {
  font-family: "Cambria";
  font-weight: bold;
  font-style: normal;
  src: url(res:///Data/epub/FONT/cambria/cambriab.ttf);
}

@font-face {
  font-family: "Cambria";
  font-weight: normal;
  font-style: italic;
  src: url(res:///Data/epub/FONT/cambria/cambriai.ttf);
}

@font-face {
  font-family: "Cambria";
  font-weight: bold;
  font-style: italic;
  src: url(res:///Data/epub/FONT/cambria/cambriaz.ttf);
}

@font-face {
  font-family: "sans-serif1";
  src:url(res:///opt/sony/ebook/FONT/tt0003m_.ttf);
}

h1 {
  font-family: "sans-serif1, sans-serif;"
}

body {
	font-family: "Cambria";
}
ander111 - this is the code I use, in case this helps. I include both the font family name and font style (sans-serif) in the body tag. Don't know if that makes a difference.

@font-face {
font-family: "Fontin";
font-weight: normal;
font-style: normal;
src: url(res:///Data/fonts/Fontin_Sans_R_45b.otf);
}
@font-face {
font-family: "Fontin";
font-weight: bold;
font-style: normal;
src: url(res:///Data/fonts/Fontin_Sans_B_45b.otf);
}
@font-face {
font-family: "Fontin";
font-weight: normal;
font-style: italic;
src: url(res:///Data/fonts/Fontin_Sans_I_45b.otf);
}
@font-face {
font-family: "Fontin";
font-weight: bold;
font-style: italic;
src: url(res:///Data/fonts/Fontin_Sans_BI_45b.otf);
}
body {
font-family: "Fontin", sans-serif;
}
sbtx99 is offline   Reply With Quote