Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 05-17-2011, 11:33 PM   #1
denverh
Enthusiast
denverh began at the beginning.
 
Posts: 25
Karma: 10
Join Date: May 2011
Device: prs-650
Are factory fonts the same for all Sony models?

Hello,

I've been searching and reading font related threads for a while now, looking for an answer to that question. I have a 650 with the latest PRS+, and would like to try replacing the default font. I've read Valloric's excellent guide for the 505, as well as a number of others, and I'm pretty sure I understand the various methods available for changing fonts.

I would like to follow Valloric's procedure (also referenced in the PRS+ wiki), but before I do I would like to verify that the 650's font names are still "Dutch801 Rm BT", "Swis721 BT", and "Courier10 BT". And with the following filenames: "tt0011m_.ttf", "tt003m_.ttf", and "tt0419m_.ttf".

The font topic gets a lot of flogging, so forgive me if I seem to be going over old ground. I haven't been able to find any place that explicitly indicates that all the Sony models use the same fonts and font filenames. If the price for being wrong wasn't a brick, I would just go ahead and experiment.

Thanks,

Denver
denverh is offline   Reply With Quote
Old 05-18-2011, 05:17 AM   #2
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
denverh
Quote:
I would like to verify that the 650's font names are still "Dutch801 Rm BT", "Swis721 BT", and "Courier10 BT". And with the following filenames: "tt0011m_.ttf", "tt003m_.ttf", and "tt0419m_.ttf".
Yes they are. Newer models got a couple of more glyphs (like arrows) but that's it. PRS+ is using the same font files for all models.
kartu is offline   Reply With Quote
Advert
Old 05-19-2011, 10:49 PM   #3
denverh
Enthusiast
denverh began at the beginning.
 
Posts: 25
Karma: 10
Join Date: May 2011
Device: prs-650
Thanks Kartu. That's what I suspected, but it's good to know for sure.

If I understand correctly, there are three ways to change epub fonts:
1. Add a css to the epub that specifies the desired font and copy the font file(s) to the reader. This is most easily done with calibre, using the Extra CSS field when converting.

2. Copy the fonts you want to use to the reader, install PRS+, and add css files to the reader at /database/system/PRSPlus/epub/. Then select the desired css through the PRS+ SETTINGS menus of the reader. Whichever css file you select gets copied to style.css.

3. Modify the name of your desired font, and its filename. to match what the reader uses internally. Copy that to the reader, create a simple shell script on the reader to mount the location of your new font, and add a css to point to it.

I've tried #1, and it works ok, but it's not very flexible.

I haven't tried #3 yet. That's the one where there's a risk of bricking the reader. It does have the advantage of changing fonts for all types of books, not just epub.

#2 seems to be the most flexible, even though it applies only to epubs, but I haven't been able to get it to work.

I have the following fonts in the reader's /fonts directory:
DroidSerif-Bold.ttf
DroidSerif-BoldItalic.ttf
DroidSerif-Italic.ttf
DroidSerif-Regular.ttf
Fontin-Bold.ttf
Fontin-Italic.ttf
Fontin-Regular.ttf
Fontin-SmallCaps.ttf
WREXHAM_.TTF

And I have the following in the reader's /database/system/PRSPlus/epub directory:
FontsAsInLRF.css
droid.css
fontin.css
style.css
wrexham.css

Right now I have the wrexham css selected, so that's also what's in style.css. Here's how it looks:
@font-face {

font-family: "Wrexham Script";
font-weight: normal;
font-style: normal;
src: url(res:///Data/fonts/WREXHAM_.TTF);

}

@font-face {

font-family: "Wrexham Script";
font-weight: bold;
font-style: normal;
src: url(res:///Data/fonts/WREXHAM_.TTF);

}

@font-face {

font-family: "Wrexham Script";
font-weight: normal;
font-style: italic;
src: url(res:///Data/fonts/WREXHAM_.TTF);

}

@font-face {

font-family: "Wrexham Script";
font-weight: bold;
font-style: italic;
src: url(res:///Data/fonts/WREXHAM_.TTF);

}

body {

font-family: "Wrexham Script", serif;
widows: 0;
orphans: 0;

}

Maybe I've just been looking at this for too long, but I don't see anything wrong with any of it. Or did I miss something essential along the way?

Thanks,

Denver
denverh is offline   Reply With Quote
Old 05-20-2011, 04:46 AM   #4
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
denverh
1) Correct
2) Correct
3) To my knowledge, there is no risk to brick reader with such script with CFWs that I know (mine, boroda's or amutin's) since the script does not get executed, if reader is connected to USB during startup. That allows you to recover from errors.

Note, however, that there seems to be a hard limit on number of items you can "mount --bind", it seems for x50 it is 3. After that it simply doesn't work. PRS+ is using 2 out of the box, 3rd if you use custom values in "LRF Text Scale".

Now regarding your custom CSS. Shortest way to create such CSS is to take FontsAsInLRF.css and replace the paths to the font files.

You need to mention "font-weight:" when defining font-face only if there are different files for different font weights. I'm not sure if URL must be in quotes or is it optional.

And one important point: if you are using 2.0.11b, there is a bug with the path to CSS files. (will be fixed soon in 2.0.12b) As a workaround you put save your CSS file as /epub/userStyle.css in internal memory.
kartu is offline   Reply With Quote
Old 05-20-2011, 10:36 PM   #5
denverh
Enthusiast
denverh began at the beginning.
 
Posts: 25
Karma: 10
Join Date: May 2011
Device: prs-650
Quote:
Originally Posted by kartu View Post
denverh
1) Correct
2) Correct
3) To my knowledge, there is no risk to brick reader with such script with CFWs that I know (mine, boroda's or amutin's) since the script does not get executed, if reader is connected to USB during startup. That allows you to recover from errors.
I was wondering if plugging the reader in during startup might not be the way to unbrick it, if things went wrong. This is good to know.

Quote:
Originally Posted by kartu View Post
denverh
Now regarding your custom CSS. Shortest way to create such CSS is to take FontsAsInLRF.css and replace the paths to the font files.

You need to mention "font-weight:" when defining font-face only if there are different files for different font weights. I'm not sure if URL must be in quotes or is it optional.

And one important point: if you are using 2.0.11b, there is a bug with the path to CSS files. (will be fixed soon in 2.0.12b) As a workaround you put save your CSS file as /epub/userStyle.css in internal memory.

I am using PRS+ 2.0.11b, on a 650. I tried modifying FontsAsInLRF.css as follows, and putting it in .../epub/userStyle.css:
@font-face
{
font-family: sans-serif;
src:url(res:///Data/fonts/WREXHAM_.TTF);
}
@font-face
{
font-family: serif;
src:url(res:///Data/fonts/WREXHAM_.TTF);
}
@font-face
{
font-family: monospace;
src:url(res:///Data/fonts/WREXHAM_.TTF);
}

I picked Wrexham because it will be immediately obvious that the font changed. Anyway, all the books I checked still look the same as before. I also made sure that userStyle.css was picked in the "User EPUB Style" menu. So I'm still having trouble getting this particular option to work. Any suggestions?

Thanks,

Denver

Ah ha! The workaround location for userStyle.css is /epub, not the epub directory in /database/system/PRSPlus.

Last edited by denverh; 05-25-2011 at 10:21 PM. Reason: update
denverh is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ended Brand new Sony PRS-500 + Sony factory warranty Esquire1 Flea Market 2 09-03-2010 07:46 PM
New Sony Reader Library hints at new models, regions igorsk News 25 09-01-2010 06:08 AM
What models are the Sony eReaders sold by Borders abeaty Sony Reader 1 06-29-2010 05:55 PM
More Sony Reader models to appear? igorsk News 6 09-11-2009 01:35 AM
New models Sony PRS 700 and Kindle 2 sirmaru Sony Reader 0 10-05-2008 08:29 PM


All times are GMT -4. The time now is 11:31 AM.


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