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 01-19-2012, 04:37 PM   #46
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,167
Karma: 16228536
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by treadlightly View Post
Thanks jackie_w, it worked!
That's good
jackie_w is offline   Reply With Quote
Old 01-19-2012, 07:12 PM   #47
Morkl
Connoisseur
Morkl can talk to the animals.Morkl can talk to the animals.Morkl can talk to the animals.Morkl can talk to the animals.Morkl can talk to the animals.Morkl can talk to the animals.Morkl can talk to the animals.Morkl can talk to the animals.Morkl can talk to the animals.Morkl can talk to the animals.Morkl can talk to the animals.
 
Posts: 80
Karma: 68347
Join Date: Oct 2009
Location: Sweden
Device: PRS-T1
Heads up for those not following my development thread: I just posted a Reader with customizable number of page turns between screen refreshes!

Quote:
Originally Posted by jackie_w View Post
What would be very useful is an on-device app which lists all your custom .css files contained in the /mnt/sdcard/css directory and lets you pick a new default when you want to change fonts or font-sizes or whatever else.

Not having to connect to the PC to make the change would be very convenient. It could be as simple as just copying the selected .css file to the fixed filename style.css in the same directory. Then your modded reader app would work as-is. This is how the PRSPlus custom firmware for the older Sony models handles this feature.
That would be a convenient solution. I no one beats me to it, I'll take a look at it in the weekend.

Quote:
Originally Posted by soseono View Post
Morkl,

Again thanks much for the good work. By the way, I'm using the latest version, and found that the font size setting doesn't follow the global setting value (System Settings -> Application Preferences -> Books/Periodicals -> Font Size Preference). I've set the system setting value to a larger font size (the third smallest), but the font size of all the new books that I open with your modded reader app is the system's initial default value, which is the second smallest.

FYI, just in case you weren't aware of this issue.
Thanks for pointing it out. I'm fairly certain it is because the modified Reader is not allowed access to the stock Settings app's shared data, because it is signed with my key instead of Sony's. I think I'll have to provide a modified Settings app (which in turn would not work with the stock apps) to make it work but I'd love to be proven wrong.
Morkl is offline   Reply With Quote
Old 01-19-2012, 11:07 PM   #48
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
Quote:
Originally Posted by Morkl View Post
Thanks for pointing it out. I'm fairly certain it is because the modified Reader is not allowed access to the stock Settings app's shared data, because it is signed with my key instead of Sony's. I think I'll have to provide a modified Settings app (which in turn would not work with the stock apps) to make it work but I'd love to be proven wrong.
I don't think that's to do with the key, but rather than it's installed as a different app with a different user ID.

For example, on my T1 /data/data/com.sony.drbd.ebook.reader is owned by UID 10006 (and GID 10006) but /data/data/com.sony.drbd.ebook_mod.reader is owned by UID 10046 (and GID 10006). Under /data/data/com.sony.drbd.ebook.reader there's a directory called shared_prefs and a file in there called com.sony.drbd.ebook.reader_preferences.xml and the permissions on that file are read/write for the user and group, but no access for everyone else.

Cheers,
Simon.
snarkophilus is offline   Reply With Quote
Old 01-20-2012, 02:33 AM   #49
Morkl
Connoisseur
Morkl can talk to the animals.Morkl can talk to the animals.Morkl can talk to the animals.Morkl can talk to the animals.Morkl can talk to the animals.Morkl can talk to the animals.Morkl can talk to the animals.Morkl can talk to the animals.Morkl can talk to the animals.Morkl can talk to the animals.Morkl can talk to the animals.
 
Posts: 80
Karma: 68347
Join Date: Oct 2009
Location: Sweden
Device: PRS-T1
Quote:
Originally Posted by snarkophilus View Post
I don't think that's to do with the key, but rather than it's installed as a different app with a different user ID.

For example, on my T1 /data/data/com.sony.drbd.ebook.reader is owned by UID 10006 (and GID 10006) but /data/data/com.sony.drbd.ebook_mod.reader is owned by UID 10046 (and GID 10006). Under /data/data/com.sony.drbd.ebook.reader there's a directory called shared_prefs and a file in there called com.sony.drbd.ebook.reader_preferences.xml and the permissions on that file are read/write for the user and group, but no access for everyone else.

Cheers,
Simon.
Yes, but all apps sharing a user ID must be signed with the same key Perhaps the actual file permissions can be changed, but then I'd have to make sure they aren't overwritten.
Morkl is offline   Reply With Quote
Old 01-20-2012, 02:53 AM   #50
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
Quote:
Originally Posted by Morkl View Post
Yes, but all apps sharing a user ID must be signed with the same key Perhaps the actual file permissions can be changed, but then I'd have to make sure they aren't overwritten.
Ahh, I didn't realise that more than one app can share a UID. I had thought that all the Sony apps are different UIDs, but if I look closely I can see for example that reader and netapp both use user ID 10006.

I've set my reader shared prefs file to mode 664, and then changed the default font size and that at least didn't reset the permissions. I'll see if it sticks or gets reset at some stage.

The sledgehammer would be for your app to run as root but that does seem like overkill.

Off topic - there's a pref in the xml called SpreadDirection, set to 0. Does that make any sense to anyone?

Cheers,
Simon.
snarkophilus is offline   Reply With Quote
Old 01-20-2012, 05:17 AM   #51
Morkl
Connoisseur
Morkl can talk to the animals.Morkl can talk to the animals.Morkl can talk to the animals.Morkl can talk to the animals.Morkl can talk to the animals.Morkl can talk to the animals.Morkl can talk to the animals.Morkl can talk to the animals.Morkl can talk to the animals.Morkl can talk to the animals.Morkl can talk to the animals.
 
Posts: 80
Karma: 68347
Join Date: Oct 2009
Location: Sweden
Device: PRS-T1
Quote:
Originally Posted by snarkophilus View Post
Ahh, I didn't realise that more than one app can share a UID. I had thought that all the Sony apps are different UIDs, but if I look closely I can see for example that reader and netapp both use user ID 10006.

I've set my reader shared prefs file to mode 664, and then changed the default font size and that at least didn't reset the permissions. I'll see if it sticks or gets reset at some stage.

The sledgehammer would be for your app to run as root but that does seem like overkill.

Off topic - there's a pref in the xml called SpreadDirection, set to 0. Does that make any sense to anyone?

Cheers,
Simon.
Does the modified Reader use the default font size after you set the permissions?
Morkl is offline   Reply With Quote
Old 01-20-2012, 07:05 AM   #52
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,167
Karma: 16228536
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
@Morkl,

On the subject of font-sizes and building on your sterling work so far... The Sony reader app has a choice of 8 (which admittedly is an improvement on the earlier models), however, I expect I'm not alone in finding it not as good as it might be. I was wondering if it would be possible to give the user more control of what those 8 sizes are, by fine-tuning the size increase between one setting and the next?
jackie_w is offline   Reply With Quote
Old 01-20-2012, 07:08 AM   #53
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
Quote:
Originally Posted by Morkl View Post
Does the modified Reader use the default font size after you set the permissions?
Umm, stupid question - how do you normally use the default font size stuff?

I've tried both the modified Reader and the standard Reader after changing the default font size to the largest setting. Both still use the (normal) second smallest font size. I've reverted the permissions on the pref file back to the way they were originally, and still no change. I've opened books that I haven't yet opened on this device but still the same.

I'd never changed the default font size setting before, so I don't know what I'm looking for. It seems like it should be a lot simpler than this!

Cheers,
Simon.
snarkophilus is offline   Reply With Quote
Old 01-20-2012, 09:04 AM   #54
Morkl
Connoisseur
Morkl can talk to the animals.Morkl can talk to the animals.Morkl can talk to the animals.Morkl can talk to the animals.Morkl can talk to the animals.Morkl can talk to the animals.Morkl can talk to the animals.Morkl can talk to the animals.Morkl can talk to the animals.Morkl can talk to the animals.Morkl can talk to the animals.
 
Posts: 80
Karma: 68347
Join Date: Oct 2009
Location: Sweden
Device: PRS-T1
Quote:
Originally Posted by jackie_w View Post
@Morkl,

On the subject of font-sizes and building on your sterling work so far... The Sony reader app has a choice of 8 (which admittedly is an improvement on the earlier models), however, I expect I'm not alone in finding it not as good as it might be. I was wondering if it would be possible to give the user more control of what those 8 sizes are, by fine-tuning the size increase between one setting and the next?
Should be possible; I think I've seen the sizes defined as a list of numbers somewhere in the code. Will look into it.

Quote:
Originally Posted by snarkophilus View Post
Umm, stupid question - how do you normally use the default font size stuff?

I've tried both the modified Reader and the standard Reader after changing the default font size to the largest setting. Both still use the (normal) second smallest font size. I've reverted the permissions on the pref file back to the way they were originally, and still no change. I've opened books that I haven't yet opened on this device but still the same.

I'd never changed the default font size setting before, so I don't know what I'm looking for. It seems like it should be a lot simpler than this!

Cheers,
Simon.
Seems weird! I have no idea how it should work though; I've never used it myself either. Anyone else who uses the default font size setting?
Morkl is offline   Reply With Quote
Old 01-20-2012, 09:25 AM   #55
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,167
Karma: 16228536
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by Morkl View Post
Should be possible; I think I've seen the sizes defined as a list of numbers somewhere in the code. Will look into it.
Thank you

Quote:
Originally Posted by Morkl View Post
Seems weird! I have no idea how it should work though; I've never used it myself either. Anyone else who uses the default font size setting?
I just tried this out. I have my default size set to 4.
If I open a new book with the default reader the book opens at size 4.
If I open a new book with the modified reader the book opens at size 2.
Do I care? No, not really, because once you set the size for a book it's remembered forever after. If this is the tiny price I pay to get all your improvements I'll take it any day (IMO only of course).
jackie_w is offline   Reply With Quote
Old 01-20-2012, 01:00 PM   #56
giosa
Connoisseur
giosa exercises by bench pressing the entire Harry Potter series in hardcovergiosa exercises by bench pressing the entire Harry Potter series in hardcovergiosa exercises by bench pressing the entire Harry Potter series in hardcovergiosa exercises by bench pressing the entire Harry Potter series in hardcovergiosa exercises by bench pressing the entire Harry Potter series in hardcovergiosa exercises by bench pressing the entire Harry Potter series in hardcovergiosa exercises by bench pressing the entire Harry Potter series in hardcovergiosa exercises by bench pressing the entire Harry Potter series in hardcovergiosa exercises by bench pressing the entire Harry Potter series in hardcovergiosa exercises by bench pressing the entire Harry Potter series in hardcovergiosa exercises by bench pressing the entire Harry Potter series in hardcover
 
Posts: 90
Karma: 16056
Join Date: Dec 2011
Device: Sony PRS T1
Quote:
Originally Posted by Morkl View Post
...and here it is! Stock Reader with custom fonts in the select-a-font-thingy (and the italic/bold-fix, of course).

Fonts are specified in /sdcard/fonts/fonts.xml, and if that file is not found or cannot be read it falls back to the stock fonts.

"Screenshots" attached, with exaggerated fonts to make it clear that it works (the reason "Bold italicized text" is not italicized in one of the images is that I had no bold-italic file for that font, so i set the bold file as bold-italic).

As you can see, the "Selected Font Type" thingy does not show the custom font name for now; it consists of a bunch of hard coded button resources and so requires a bit of extra work to replace.

File: http://morkl.se/reader/readermod_v2.zip (contains loose apk as well as installer for non-rooted devices; and fonts folder with sample settings)
Morkl


Any chance to make Sony PRS T1 stock reader to display notes and TOC in unicode?
It's really not helpful when I see ???????? marks in squares. Please, can you do anything about that? Thanks!

Last edited by giosa; 01-20-2012 at 01:12 PM.
giosa is offline   Reply With Quote
Old 01-20-2012, 01:16 PM   #57
rupor
meat popsicle
rupor rocks like Gibraltar!rupor rocks like Gibraltar!rupor rocks like Gibraltar!rupor rocks like Gibraltar!rupor rocks like Gibraltar!rupor rocks like Gibraltar!rupor rocks like Gibraltar!rupor rocks like Gibraltar!rupor rocks like Gibraltar!rupor rocks like Gibraltar!rupor rocks like Gibraltar!
 
rupor's Avatar
 
Posts: 225
Karma: 100000
Join Date: Jul 2007
Location: USA
Device: Kindles, Pixels, iPads
Quote:
Originally Posted by Morkl View Post
Yes, but all apps sharing a user ID must be signed with the same key Perhaps the actual file permissions can be changed, but then I'd have to make sure they aren't overwritten.
Why not to sign your app with the same key Sony does? To the best of my knowledge they are using testing keys from CyanogenMod project, you just have to be careful which key to use with which application (see keys.txt in my SVN), that all. If you will re-sign EbookSettings - your reader may start working, but other applications will lose - or are you going to re-sign all of them?
rupor is offline   Reply With Quote
Old 01-20-2012, 07:58 PM   #58
giosa
Connoisseur
giosa exercises by bench pressing the entire Harry Potter series in hardcovergiosa exercises by bench pressing the entire Harry Potter series in hardcovergiosa exercises by bench pressing the entire Harry Potter series in hardcovergiosa exercises by bench pressing the entire Harry Potter series in hardcovergiosa exercises by bench pressing the entire Harry Potter series in hardcovergiosa exercises by bench pressing the entire Harry Potter series in hardcovergiosa exercises by bench pressing the entire Harry Potter series in hardcovergiosa exercises by bench pressing the entire Harry Potter series in hardcovergiosa exercises by bench pressing the entire Harry Potter series in hardcovergiosa exercises by bench pressing the entire Harry Potter series in hardcovergiosa exercises by bench pressing the entire Harry Potter series in hardcover
 
Posts: 90
Karma: 16056
Join Date: Dec 2011
Device: Sony PRS T1
Any chance to make Sony PRS T1 stock reader to display notes and TOC in unicode?
It's really not helpful when I see ???????? marks in squares. Please, can you do anything about that? Thanks!
giosa is offline   Reply With Quote
Old 01-20-2012, 08:07 PM   #59
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,517
Karma: 126422064
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by giosa View Post
Any chance to make Sony PRS T1 stock reader to display notes and TOC in unicode?
It's really not helpful when I see ???????? marks in squares. Please, can you do anything about that? Thanks!
Install the modified reader app and then you can try any of the fonts. If none of them work, you can install your own font and put it in the font menu. Problem solved.
JSWolf is offline   Reply With Quote
Old 01-20-2012, 10:14 PM   #60
giosa
Connoisseur
giosa exercises by bench pressing the entire Harry Potter series in hardcovergiosa exercises by bench pressing the entire Harry Potter series in hardcovergiosa exercises by bench pressing the entire Harry Potter series in hardcovergiosa exercises by bench pressing the entire Harry Potter series in hardcovergiosa exercises by bench pressing the entire Harry Potter series in hardcovergiosa exercises by bench pressing the entire Harry Potter series in hardcovergiosa exercises by bench pressing the entire Harry Potter series in hardcovergiosa exercises by bench pressing the entire Harry Potter series in hardcovergiosa exercises by bench pressing the entire Harry Potter series in hardcovergiosa exercises by bench pressing the entire Harry Potter series in hardcovergiosa exercises by bench pressing the entire Harry Potter series in hardcover
 
Posts: 90
Karma: 16056
Join Date: Dec 2011
Device: Sony PRS T1
Quote:
Originally Posted by JSWolf View Post
Install the modified reader app and then you can try any of the fonts. If none of them work, you can install your own font and put it in the font menu. Problem solved.
Thanks. I did install mod reader. I tried sylfaen.ttf it shows fonts correctly. But it crashes when I try to go to notes to see if my bookmarks show correct characters. Any suggestion?
giosa is offline   Reply With Quote
Reply

Tags
css, fonts

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PRS-350 Changing Fonts in PRS+ spacebrew Sony Reader Dev Corner 31 08-24-2012 06:29 AM
PRS-350 PRS 350 & PRS+: Changing LRF-fonts permanently Analogus Sony Reader Dev Corner 21 11-08-2011 11:55 AM
Am i doing it right?PRS+ and CSS forced Epub fonts via Calibre melkorbauglir Sony Reader 20 07-29-2011 10:09 AM
How does the fonts of PRS-350 and PRS-650 compare to each other? lkkmaths Sony Reader 16 04-08-2011 07:43 PM
Changing text size and fonts with PRS 505 levi_john Sony Reader 1 01-20-2009 03:25 AM


All times are GMT -4. The time now is 07:56 AM.


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