View Single Post
Old 01-08-2012, 09:14 PM   #1
snarkophilus
Wannabe Connoisseur
snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.
 
Posts: 425
Karma: 2516674
Join Date: Apr 2011
Location: Geelong, Australia
Device: Kobo Libra 2, Kobo Aura 2, Sony PRS-T1, Sony PRS-350, Palm TX
Question Changing fonts and CSS on PRS-T1 like PRS+?

I thought it was worth making a separate thread about trying to find a way to create a PRS+ like "User CSS" for the T1. There's been a little discussion in the PRS+ thread at here, here and here, but no real progress unfortunately.

In the last PRS+ post I listed, I said:

I've found a file on the reader called /system/lib/libreadercore.so. Inside that, there is the text res:///userStyle.css. I've tried putting a userStyle.css in / (the root directory), /data, /system and /mnt/sdcard and none of these appear to work.

I've pulled apart /system/app/EbookReader.apk and system/app/EbookReader.odex but these don't seem to reference CSS much - it looks like everything is handled in /system/lib/libreadercore.so. I'll dig around in there a bit more...

Following on from that and using some tools Morkl posted here I've further pulled apart the EbookReader.apk and EbookReader.odex files and found a reference to a method called getDocumentCSS() which looks like it builds up @font-face statements based on the current font. Unfortuantely I can't see an easy way to override anything yet.

One thing I have found is that there are multiple places in the EbookReader files where the list of fonts is hard coded (Amasis, FrutigerNeue, PalatinoNova, ReallyNo2, UniversNext, Verdana), and that Japanese models have an extra two hard coded fonts (Mincho and Gothic). It really looks like there's no way to add extra fonts to the current Sony reader app without a lot of work.

Looks like it's back to digging inside of /system/lib/libreadercore.so which isn't as easy as looking inside the apk/odex files.

Cheers,
Simon.
snarkophilus is offline   Reply With Quote