07-15-2012, 12:11 PM | #361 |
ebooknut
Posts: 297
Karma: 688154
Join Date: Oct 2011
Device: Kindle Voyage & Oasis
|
I'm sure jackie_w will provide a more complete explanation, but some quick examples in the meantime:
Sample code for using fonts already installed on your T1 (you'll find a list of the built-in fonts in the Wiki): Spoiler:
Sample code for using your own fonts (create a "fonts" folder in your "reader" folder, then copy your fonts into the "fonts" folder): Spoiler:
Don't forget to update your reader.xml file with the proper font names and filenames: Spoiler:
Note: CSS rules can be tricky. The above is bare-bones and just enough to get people started. It will work for many but not all epubs, depending on how they're formatted. Last edited by pssquirrel; 07-15-2012 at 12:19 PM. |
07-15-2012, 05:17 PM | #362 |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Worked example of font customisation for PRST1 modified reader app
First of all let me say that I know the title of this thread is 'Modified Sony home screen'. These detailed notes are relevant only to those using Morkl's modified reader app - not his modified home screen app.
I have assumed no previous knowledge of css (Cascading Style Sheet) or html (HyperText Markup Language), so apologies if this is rather long - try not to let it put you off In summary, if you want to use the modified reader app to customise your fonts, the configuration file, [READER Drive:]\reader\reader.xml, is used in conjunction with 7 css files, which you create yourself using a simple text editor. You then place the 7 css files in the directory [READER Drive:]\reader\css There are some samples included in Morkl's June downloaded zip file. I'm going to be using a worked example where all of the 3 default fonts (i.e. serif, sans-serif and monospace) have been customised to:
Here is a detailed step-by-step for customising fonts, assuming you have already done the installation procedure for the modified reader app:
Spoiler:
General notes:
I'm going cross-eyed at this point, so I'm going to call it a day for this first draft. If anyone spots anything which could be explained better, please let me know (politely) and I'll update accordingly. Last edited by jackie_w; 07-18-2012 at 11:29 AM. Reason: extra warning added |
07-15-2012, 05:36 PM | #363 |
Enthusiast
Posts: 37
Karma: 16
Join Date: Nov 2011
Device: Sony PRS-T1
|
This is fantastic, jackie_w. Thanks so much!
|
07-15-2012, 08:00 PM | #364 |
Resident Curmudgeon
Posts: 74,048
Karma: 129333562
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
I have to disagree with the CSS for default. The line-height is not needed at all. Plus, the @page is also no needed and if anyone wants a specific @page, they can add it in with Modify ePub. Also, the widows and orphans set to 0 makes the end of the page much nicer then the constantly shifting end.
Code:
@font-face {font-family: serif; font-weight: normal; font-style: normal; src: url(res:///ebook/fonts/../../mnt/sdcard/reader/fonts/CharisSILR.ttf)} @font-face {font-family: serif; font-weight: normal; font-style: italic; src: url(res:///ebook/fonts/../../mnt/sdcard/reader/fonts/CharisSILI.ttf)} @font-face {font-family: serif; font-weight: bold; font-style: normal; src: url(res:///ebook/fonts/../../mnt/sdcard/reader/fonts/CharisSILB.ttf)} @font-face {font-family: serif; font-weight: bold; font-style: italic; src: url(res:///ebook/fonts/../../mnt/sdcard/reader/fonts/CharisSILBI.ttf)} @font-face{ font-family: sans-serif; font-style:normal; font-weight:normal; src: url(res:///ebook/fonts/FrutigerNeueLTW1G-Regular.otf)} @font-face{ font-family: sans-serif; font-style:italic; font-weight:normal; src: url(res:///ebook/fonts/FrutigerNeueLTW1G-Italic.otf)} @font-face{ font-family: sans-serif; font-style:normal; font-weight:bold; src: url(res:///ebook/fonts/FrutigerNeueLTW1G-Bold.otf)} @font-face{ font-family: sans-serif; font-style:italic; font-weight:bold; src: url(res:///ebook/fonts/FrutigerNeueLTW1G-BoldIt.otf)} @font-face {font-family: monospace; font-weight: normal; font-style: normal; src: url(res:///ebook/fonts/../../mnt/sdcard/reader/fonts/DarkCourier.ttf)} @font-face {font-family: monospace; font-weight: normal; font-style: italic; src: url(res:///ebook/fonts/../../mnt/sdcard/reader/fonts/DarkCourierI.ttf)} @font-face {font-family: monospace; font-weight: bold; font-style: normal; src: url(res:///ebook/fonts/../../mnt/sdcard/reader/fonts/DarkCourierB.ttf)} @font-face {font-family: monospace; font-weight: bold; font-style: italic; src: url(res:///ebook/fonts/../../mnt/sdcard/reader/fonts/DarkCourierBI.ttf)} html { font-family: serif; widows: 0; orphans: 0; } body, body.book, body.text, body.calibre, body.calibre1, body.calibre2, body.calibre3, body.calibre4 { margin-top: 0; margin-bottom: 0; margin-left: 0; margin-right: 0; text-align: justify } Code:
@font-face {font-family: serif; font-weight: normal; font-style: normal; src: url(res:///ebook/fonts/AmasisMTW1G.otf)} @font-face {font-family: serif; font-weight: normal; font-style: italic; src: url(res:///ebook/fonts/AmasisMTW1G-Italic.otf)} @font-face {font-family: serif; font-weight: bold; font-style: normal; src: url(res:///ebook/fonts/AmasisMTW1G-Bold.otf)} @font-face {font-family: serif; font-weight: bold; font-style: italic; src: url(res:///ebook/fonts/AmasisMTW1G-BoldItalic.otf)} @font-face{ font-family: sans-serif; font-style:normal; font-weight:normal; src: url(res:///ebook/fonts/FrutigerNeueLTW1G-Regular.otf)} @font-face{ font-family: sans-serif; font-style:italic; font-weight:normal; src: url(res:///ebook/fonts/FrutigerNeueLTW1G-Italic.otf)} @font-face{ font-family: sans-serif; font-style:normal; font-weight:bold; src: url(res:///ebook/fonts/FrutigerNeueLTW1G-Bold.otf)} @font-face{ font-family: sans-serif; font-style:italic; font-weight:bold; src: url(res:///ebook/fonts/FrutigerNeueLTW1G-BoldIt.otf)} @font-face {font-family: monospace; font-weight: normal; font-style: normal; src: url(res:///ebook/fonts/../../mnt/sdcard/reader/fonts/DarkCourier.ttf)} @font-face {font-family: monospace; font-weight: normal; font-style: italic; src: url(res:///ebook/fonts/../../mnt/sdcard/reader/fonts/DarkCourierI.ttf)} @font-face {font-family: monospace; font-weight: bold; font-style: normal; src: url(res:///ebook/fonts/../../mnt/sdcard/reader/fonts/DarkCourierB.ttf)} @font-face {font-family: monospace; font-weight: bold; font-style: italic; src: url(res:///ebook/fonts/../../mnt/sdcard/reader/fonts/DarkCourierBI.ttf)} html { font-family: serif; widows: 0; orphans: 0; } body, body.book, body.text, body.calibre, body.calibre1, body.calibre2, body.calibre3, body.calibre4 { margin-top: 0; margin-bottom: 0; margin-left: 0; margin-right: 0; text-align: justify } Last edited by JSWolf; 07-15-2012 at 08:07 PM. |
07-15-2012, 09:33 PM | #365 |
Junior Member
Posts: 8
Karma: 12
Join Date: Dec 2011
Device: PRS-T1
|
Thinking about taking the plunge into installing this fantastic Modified Reader app on an unrooted T1 and I was wondering if this was similar to a firmware update.
IE: Is it good practice to make sure I'm on a fully charged battery when attempting this? Also, should I be bothered with formatting or factory resetting my e-reader first, applying the latest firmware update and then installing this? |
07-15-2012, 10:25 PM | #366 |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
@JSWolf,
You are welcome to add your own opinions, but neither yours nor mine are the 'One True Way'. But taking your points one at a time:
BTW, I'm happy to further debate Sony vs. css best practice with you, if you like, but this thread is not the place to do it. PM me any time you like. Might be fun Last edited by jackie_w; 07-17-2012 at 07:32 AM. Reason: followup on widows & orphans |
07-15-2012, 11:22 PM | #367 | ||||
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
Quote:
Quote:
Quote:
|
||||
07-15-2012, 11:44 PM | #368 | ||
ebooknut
Posts: 297
Karma: 688154
Join Date: Oct 2011
Device: Kindle Voyage & Oasis
|
Widows & Orphans
Quote:
Quote:
|
||
07-16-2012, 10:08 AM | #369 | |
Resident Curmudgeon
Posts: 74,048
Karma: 129333562
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
07-16-2012, 10:29 AM | #370 |
ebooknut
Posts: 297
Karma: 688154
Join Date: Oct 2011
Device: Kindle Voyage & Oasis
|
|
07-16-2012, 11:53 AM | #371 | |||||||||
Resident Curmudgeon
Posts: 74,048
Karma: 129333562
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
|
|||||||||
07-17-2012, 12:19 AM | #372 |
Enthusiast
Posts: 37
Karma: 16
Join Date: Nov 2011
Device: Sony PRS-T1
|
I'm getting an error message when I try to replace the default.css:
Error 0x80070570: The file or directory is corrupted and unreadable. This is apparently often a sign of a bad sector, which I hope isn't the case on my reader's internal memory. Any suggestions? |
07-17-2012, 12:39 AM | #373 |
Enthusiast
Posts: 37
Karma: 16
Join Date: Nov 2011
Device: Sony PRS-T1
|
I eventually ran Check Disk, it deleted the affected files (reader.xml and default.css) and I replaced them. All is well.
|
07-17-2012, 02:02 PM | #374 |
Resident Curmudgeon
Posts: 74,048
Karma: 129333562
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Do you eject your T1 from the computer or do you just yank the USB cable out? If you don't eject, you could be causing errors like you just found.
|
07-17-2012, 04:16 PM | #375 |
Enthusiast
Posts: 37
Karma: 16
Join Date: Nov 2011
Device: Sony PRS-T1
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
PRS-T1 Sony Home Screen has a hidden app launcher!!! | uboot | Sony Reader Dev Corner | 12 | 01-11-2012 03:21 PM |
I've lost my home screen | Paulc15 | Kobo Tablets | 12 | 11-16-2011 01:19 PM |
Home Screen, do you use it? | Breila | Barnes & Noble NOOK | 7 | 06-27-2011 09:01 AM |
PRS-950 Modified firmware with clock and other features - updated with latest Sony 2.0 rev | gardenstate | Sony Reader | 6 | 12-27-2010 06:06 AM |
What wallpaper do you have on your Home Screen? | naivejenni | Lounge | 31 | 12-08-2010 05:44 PM |