What it does
This hack for Sony Reader PRS-505 (possibly the newer models too, but you are on your own with them) allows you to use your custom fonts for all EPUB files without having to modify them - that is, it should work with any file you download, including protected EPUBs (not tested).

How it works
Adobe Digital Editions, which is used by PRS-505 to render EPUB files, doesn't allow simple substitution of fonts. It does allow user CSS scripts, but the script is located in an area inaccessible to user. This hack modifies the location of the user script, thus allowing the user to easily modify it. I had to hand-edit the renderer's executable file to modify the location, which could lead to various problems, but so far all tests seem to work fine.

In case it helps to hack other devices, where was userStyle.css supposed to go originally

Original location is res:///adobe/pxf/userStyle.css. I have no idea what it translates to in filesystem terms - I tried several places which seemed likely and none of them worked.

Quote:

and was this co-located with other Adobe files likely to be on other devices?

I don't understand. There are no "other Adobe files", the whole renderer is apparently stored as one (executable) file.

Quote:

Is Sony using a filesystem that does not support softlinks?

Soft-links are definitely supported (because the older method of replacing system fonts without flashing used them), but 1) I don't know how to use them, and 2) even if I did, I would need that starting point which I don't have.

I have read your installation instructions and as a very nervous (aka WIMP) PRS customiser I wonder whether you could clarify a few points for me (preferably in words of one syllable!).

I have a UK PRS-505 with the standard UK firmware, i.e. 1.2.00.18050. It has been customised using the usual JeffElkins/igorsk method.

At the risk of asking stupid questions ...

1. Do I have to restore my 505 back to original firmware before applying your new stuff or does it just add itself to existing customisations?

2. Do I have to apply your hacks to a card which already contains the JElkins hacks I want to keep, i.e. the SD card I used to do my original PRSCustomise? Or do I need to create a new SD card without the clock/LRFFonts etc stuff on it?

3. I assume as a UK user I need to use the Version 2 instructions. However, if I

'Copy the contents of directory "Files" to the root of the card'

it appears that the file "FskDocumentViewerAdobe.so" will end up inside the card directory "files.505.1.1.00.18040". My existing customisations ended up inside the card directory "files.505.1.2.00.18050". Is this correct?

4. Can the new file "/epub/userStyle.css" be edited to my heart's content, using a simple text editor once it's in the 505's internal memory?

5. Will the Calibre "Extra-CSS" conversion contents still override anything in "/epub/userStyle.css"

I hope I have explained my confusion and I look forward to your reply. Thank you.
Jackie

1. Do I have to restore my 505 back to original firmware before applying your new stuff or does it just add itself to existing customisations?

Depends which installation version you use. Version 1 replaces all of your customizations and gives you a plain 1.1.00.18040 firmware with hacked ADE. Version 2 updates your existing firmware with hacked ADE. In your case, you will want to use version 2. Don't forget to place the FskDocumentViewerAdobe.so file in an appropriate directory (in the distribution archive it is stored in 1.1.00.18040 dir).

Quote:

2. Do I have to apply your hacks to a card which already contains the JElkins hacks I want to keep, i.e. the SD card I used to do my original PRSCustomise? Or do I need to create a new SD card without the clock/LRFFonts etc stuff on it?

You can use the same card all over again. In fact, I only have one card myself, deleting its contents and replacing them with each particular hack.

In your case, you will notice that version 2 of the installation starts with something like "... download PRS Customizer and prepare your card with your favorite hacks..." - you have already done that.

Quote:

3. I assume as a UK user I need to use the Version 2 instructions.

If you want to keep UK modifications, then yes.

Quote:

However, if I

'Copy the contents of directory "Files" to the root of the card'

it appears that the file "FskDocumentViewerAdobe.so" will end up inside the card directory "files.505.1.1.00.18040". My existing customisations ended up inside the card directory "files.505.1.2.00.18050". Is this correct?

That's what 'you just need to modify the name of directory
"Files/files.505.1.1.00.18040" to your particular version' part of the "usage with other readers/other firmware versions" means - you need to copy the files to "files.505.1.2.00.18050".

Quote:

4. Can the new file "/epub/userStyle.css" be edited to my heart's content, using a simple text editor once it's in the 505's internal memory?

Yes. Just make sure the editor maintains the filename's case.

Quote:

5. Will the Calibre "Extra-CSS" conversion contents still override anything in "/epub/userStyle.css"

Yes. userStyle.css sets defaults which are overriden by book-specific styles.

... just to say, this update went very well. It took me a while to get userStyle.css the way I wanted it but this was nothing to do with the update process.

The only thing I would mention, to anyone else planning to install the new hack, is that I was expecting (wrongly) that the file /epub/userStyle.css would exist on the 505's internal memory after the update - ready to be edited. This is not the case, you have to create it. So don't assume the hack has not worked just because you can't see anything.

All in all I like this a lot, pepak. Thank you for your hard work.
Regards, Jackie

I am confused. So with this hack epubs won't work untill you create your css file, or did you mean "any change"?

Oh dear, sorry if I confused you. To be more specific, the hack process does not create the /epub/userStyle.css file. However, I believe the 505 will continue to display epubs using its original epub default fonts until you manually create the /epub/userStyle.css file which should point at your new preferred fonts already contained in the /fonts directory.

Any epubs which have their own customised fonts (either embedded or specified using extra-CSS during Calibre conversion) should use these book-specific fonts no matter what is in userStyle.css or even if userStyle.css doesn't exist.

It would be nice to integrate this with the folders hack as an all in one package.

It will be integrated soon. Open questions at the moment are:
1) what about prs 500? (I guess it doesn't have any epub support, does it?) (offtopic: I wonder about legal issues, if we just slap it onto prs 500, if it's not there yet)
2) How to use /database/system/.. folder for custom css. Isn't it possible to resize .so's symbol table? Symlinks solution is not as nice.