View Single Post
Old 10-09-2009, 10:48 PM   #1
tamzilla
Zealot
tamzilla plays well with otherstamzilla plays well with otherstamzilla plays well with otherstamzilla plays well with otherstamzilla plays well with otherstamzilla plays well with otherstamzilla plays well with otherstamzilla plays well with otherstamzilla plays well with otherstamzilla plays well with otherstamzilla plays well with others
 
tamzilla's Avatar
 
Posts: 109
Karma: 2781
Join Date: Sep 2009
Location: VA, USA
Device: nook, Ipod touch
Smile Fonts and Epub - What works on Sony, Works for Pocket Pro too!

I saw the following thread which had directions on how to change the font in ePub files on the Sony readers and thought that this would have to work on the Pocket Pro too:

http://www.mobileread.com/forums/showthread.php?t=36361

Well, after much teeth gnashing, I finally got an ePub file to use one of the fonts I had put in my /fonts directory instead of the default Times New Roman. This may work for the 6" EZReader too, since I got the directory information from the documentation included in the SDK for the Hanlin V3.

This will only work for unencrypted ePub files, since you have to edit the ePub's CSS file to make this work.

Add the following to the ePub's CSS file:

Code:
@font-face {
  font-family: "Constantia";
  font-weight: normal;
  font-style: normal;
  src: url(res:///abook/fonts/CONSTAN.TTF);
}
@font-face {
  font-family: "Constantia";
  font-weight: bold;
  font-style: normal;
  src: url(res:///abook/fonts/CONSTANBD.TTF);
}
@font-face {
  font-family: "Constantia";
  font-weight: normal;
  font-style: italic;
  src: url(res:///abook/fonts/CONSTANI.TTF);
}
@font-face {
  font-family: "Constantia";
  font-weight: bold;
  font-style: italic;
  src: url(res:///abook/fonts/CONSTANBI.TTF);
}

body { font-family: "Constantia", serif;}
Substitute the font you want to use for Constantia. The directory and file names are case sensitive, so make sure they match what is on your reader. If you use Calibre, you can add this in the extra CSS box and calibre will add it to the ePub's CSS file when you convert the file.

I noticed that one of the ePub files I did this to took longer than normal to load and took longer than normal to switch zoom sizes, but the page turn time was the same. I haven't read much in the ePub yet since I just got it working so I have no idea if it will make the file more susceptible to crashing. Try this at your own risk!!!
tamzilla is offline   Reply With Quote