View Single Post
Old 02-13-2010, 08:19 AM   #55
ShellShock
Guru
ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.
 
ShellShock's Avatar
 
Posts: 854
Karma: 1639368
Join Date: Sep 2008
Device: Sony PRS-505 & PRS-650, Kobo Glo & Aura HD
Replacing the default epub fonts in Sony Reader Library too.

I have figured out that how to replace the default epub fonts for the Sony Reader Library too, which means that we can view epubs in the Reader Library exactly as they will appear on the PRS-505, which makes formatting and editing easier, as you can easily see what the end result will look like without having to copy the epub over to the device. This is really just an extension of pepak's hack for the device (but without the hacking), so all credit to him for that.

I have only tested this on Windows.

Go to the location where the Reader Library is installed, e.g.,
C:\Program Files\Sony\Reader or C:\Program Files (x86)\Sony\Reader.

In the Data\bin directory create an adobe\pxf directory, so that you have a
C:\Program Files\Sony\Reader\Data\bin\adobe\pxf directory. Copy your userStyle.css into it. It should be the same userStyle.css that you are using on the PRS-505.

The adobe\pxf directory is the directory that the epub renderer (C:\Program Files\Sony\Reader\Data\bin\FskDocumentViewerAdobe. dll) is hard coded to read for the userStyle.css file. Unlike on the device, on Windows we have access to the adobe\pxf directory, which equates to C:\Program Files\Sony\Reader\Data\bin\adobe\pxf, so there is no need for any hacking of binaries.

Now place your fonts in C:\Program Files\Sony\Reader\Data\bin\Data\fonts. Use this location rather than C:\Program Files\Sony\Reader\Data\fonts because then you can use the same userStyle.css file on both the device and Windows. In the userStyle.css, url(res:///Data/fonts/fontfilename) equates to C:\Program Files\Sony\Reader\Data\bin\Data\fonts\fontfilename in Windows, and /fonts/fontfilename on the device.

Now when you open an epub in Reader Library, it should display using the fonts you have specified in your userStyle.css; if you use the same userStyle.css and fonts on the PRS-505, you should get exactly the same view.
ShellShock is offline   Reply With Quote