Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Sony Reader > Sony Reader Dev Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 12-19-2009, 03:43 AM   #1
pepak
Guru
pepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura about
 
Posts: 610
Karma: 4150
Join Date: Mar 2008
Device: Sony Reader PRS-T3, Kobo Libra H2O
Replace DEFAULT epub fonts! (PRS-505)

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).

Basically, you get all the benefits of ePub custom Fonts on 700, 505, 500, 300, 600 without having to modify each and every EPUB file.

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.

DOWNLOAD

Installation procedure is described in the readme file, both for "quick and easy" and "I want to combine it with other hacks" variants. If you have any problems, I will try to help.

Last edited by Nate the great; 12-19-2009 at 04:12 AM. Reason: fixed the link
pepak is offline   Reply With Quote
Old 12-19-2009, 09:18 AM   #2
wallcraft
reader
wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.
 
wallcraft's Avatar
 
Posts: 6,975
Karma: 5183568
Join Date: Mar 2006
Location: Mississippi, USA
Device: Kindle 3, Kobo Glo HD
In case it helps to hack other devices, where was userStyle.css supposed to go originally and was this co-located with other Adobe files likely to be on other devices?

Is Sony using a filesystem that does not support softlinks?
wallcraft is offline   Reply With Quote
Advert
Old 12-19-2009, 09:32 AM   #3
pepak
Guru
pepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura about
 
Posts: 610
Karma: 4150
Join Date: Mar 2008
Device: Sony Reader PRS-T3, Kobo Libra H2O
Quote:
Originally Posted by wallcraft View Post
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.
pepak is offline   Reply With Quote
Old 12-19-2009, 09:58 AM   #4
wallcraft
reader
wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.
 
wallcraft's Avatar
 
Posts: 6,975
Karma: 5183568
Join Date: Mar 2006
Location: Mississippi, USA
Device: Kindle 3, Kobo Glo HD
"Who are you?" suggested that the location might be /sony/ebook/application, but no one followed up (or perhaps they did and this was not the case).

So what actually worked is replacing the string adobe/pxf/userStyle.css with Data/epub/userStyle.css in the executable image? Nice job.
wallcraft is offline   Reply With Quote
Old 12-19-2009, 11:26 AM   #5
pepak
Guru
pepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura about
 
Posts: 610
Karma: 4150
Join Date: Mar 2008
Device: Sony Reader PRS-T3, Kobo Libra H2O
Quote:
Originally Posted by wallcraft View Post
"Who are you?" suggested that the location might be /sony/ebook/application, but no one followed up (or perhaps they did and this was not the case).
Unfortunately, it is the "this was not the case" case :-(

Quote:
So what actually worked is replacing the string adobe/pxf/userStyle.css with Data/epub/userStyle.css in the executable image?
Yes. That's all my "hacked firmware" does.
pepak is offline   Reply With Quote
Advert
Old 12-20-2009, 01:12 PM   #6
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,198
Karma: 16228558
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
More details, please ...

Hi pepak,

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
jackie_w is offline   Reply With Quote
Old 12-20-2009, 01:49 PM   #7
pepak
Guru
pepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura about
 
Posts: 610
Karma: 4150
Join Date: Mar 2008
Device: Sony Reader PRS-T3, Kobo Libra H2O
Quote:
Originally Posted by jackie_w View Post
At the risk of asking stupid questions ...
At the risk of giving stupid answers ;-)

Quote:
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.
pepak is offline   Reply With Quote
Old 12-20-2009, 02:04 PM   #8
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,198
Karma: 16228558
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Thank you, pepak, for non-stupid answers!

Edit: After update complete.

... 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

Last edited by jackie_w; 12-21-2009 at 09:37 AM.
jackie_w is offline   Reply With Quote
Old 12-22-2009, 02:27 AM   #9
kartu
PRS+ author
kartu ought to be getting tired of karma fortunes by now.kartu ought to be getting tired of karma fortunes by now.kartu ought to be getting tired of karma fortunes by now.kartu ought to be getting tired of karma fortunes by now.kartu ought to be getting tired of karma fortunes by now.kartu ought to be getting tired of karma fortunes by now.kartu ought to be getting tired of karma fortunes by now.kartu ought to be getting tired of karma fortunes by now.kartu ought to be getting tired of karma fortunes by now.kartu ought to be getting tired of karma fortunes by now.kartu ought to be getting tired of karma fortunes by now.
 
Posts: 1,637
Karma: 2446233
Join Date: Dec 2007
Device: Sony PRS-300, 505, 600, 650, 950
Quote:
Originally Posted by jackie_w View Post
So don't assume the hack has not worked just because you can't see anything.
I am confused. So with this hack epubs won't work untill you create your css file, or did you mean "any change"?

By the way, what are the differences between UK and US versions?
kartu is offline   Reply With Quote
Old 12-22-2009, 03:31 AM   #10
pthwaite
Fanatic
pthwaite has a complete set of Star Wars action figures.pthwaite has a complete set of Star Wars action figures.pthwaite has a complete set of Star Wars action figures.pthwaite has a complete set of Star Wars action figures.pthwaite has a complete set of Star Wars action figures.
 
pthwaite's Avatar
 
Posts: 597
Karma: 430
Join Date: Aug 2008
Location: Ellesmere Port, UK
Device: DR1000S Sony PRS505 iPad iPhone
I think the only difference between US and UK is the date format, ie day/month year as opposed to month/day/year.
I can't see any other differerences.

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

I'm beginning to forget what I've got "hacked" in mine now as updates are coming thick and fast
pthwaite is offline   Reply With Quote
Old 12-22-2009, 07:51 AM   #11
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,198
Karma: 16228558
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by kartu View Post
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.

I hope this is clearer. If I've got anything wrong please correct me, pepak.
jackie_w is offline   Reply With Quote
Old 12-22-2009, 09:25 AM   #12
kartu
PRS+ author
kartu ought to be getting tired of karma fortunes by now.kartu ought to be getting tired of karma fortunes by now.kartu ought to be getting tired of karma fortunes by now.kartu ought to be getting tired of karma fortunes by now.kartu ought to be getting tired of karma fortunes by now.kartu ought to be getting tired of karma fortunes by now.kartu ought to be getting tired of karma fortunes by now.kartu ought to be getting tired of karma fortunes by now.kartu ought to be getting tired of karma fortunes by now.kartu ought to be getting tired of karma fortunes by now.kartu ought to be getting tired of karma fortunes by now.
 
Posts: 1,637
Karma: 2446233
Join Date: Dec 2007
Device: Sony PRS-300, 505, 600, 650, 950
pthwaite
Quote:
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.

jackie_w
Thanks.
kartu is offline   Reply With Quote
Old 12-22-2009, 10:54 AM   #13
pepak
Guru
pepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura about
 
Posts: 610
Karma: 4150
Join Date: Mar 2008
Device: Sony Reader PRS-T3, Kobo Libra H2O
Quote:
Originally Posted by kartu View Post
I am confused. So with this hack epubs won't work untill you create your css file, or did you mean "any change"?
Any change. EPUBs work even without userStyle.css, of course.

Quote:
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)
If someone sends me an EPUB-enabled PRS-500 firmware, I will see about hacking it.
pepak is offline   Reply With Quote
Old 12-22-2009, 11:25 AM   #14
dpierron
calibre2opds guru
dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.dpierron shines like a glazed doughnut.
 
dpierron's Avatar
 
Posts: 533
Karma: 8792
Join Date: Aug 2005
Location: Metz, France
Device: iPhone, iPad, PRS-650
This is wonderful, I'm eager to get back home and try it !

Thanks, pepak, for managing to do what I tried doing for a long time, and succeeding where I failed
dpierron is offline   Reply With Quote
Old 12-23-2009, 03:19 PM   #15
pepak
Guru
pepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura about
 
Posts: 610
Karma: 4150
Join Date: Mar 2008
Device: Sony Reader PRS-T3, Kobo Libra H2O
Did you succeed, dpierron?
pepak is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PRS-600 Replace DEFAULT epub fonts! (PRS-600) pepak Sony Reader 33 08-04-2023 02:31 PM
New PRS-505 owner seeking help: default font size philma292 Sony Reader Dev Corner 2 02-14-2010 04:06 AM
Sony PRS-505 default fonts berrani Calibre 6 04-05-2009 05:59 PM
Fonts for PRS 505 levi_john Sony Reader 1 01-22-2009 08:24 AM
PRS-505 fonts. Bokkie Sony Reader 8 10-18-2008 09:17 AM


All times are GMT -4. The time now is 02:04 PM.


MobileRead.com is a privately owned, operated and funded community.