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 10-25-2011, 04:16 PM   #1
spacebrew
Enthusiast
spacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud of
 
spacebrew's Avatar
 
Posts: 41
Karma: 27540
Join Date: Sep 2011
Location: North Dallas
Device: PRS-T1, PRS-350, Droid X2
Changing Fonts in PRS+

Has anyone had any luck changing the fonts with PRS+ in the PRS-350? I have tried everything I can think of - with epubs that don't have embedded fonts, changing the directories and paths over and over and over, and I cannot get the fonts to work.

I'm using this as the path:

res:///data/fonts/

And I'm not sure if that's right. I'm not even sure where that resolves. My root directory has a 'database' directory in it. The only instructions I've seen for this have been with different models and I'm not sure if they use the same hierarchy. If anyone has any ideas, I would appreciate it.
spacebrew is offline   Reply With Quote
Old 10-25-2011, 04:25 PM   #2
Analogus
Fanatic
Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.
 
Analogus's Avatar
 
Posts: 522
Karma: 2155774
Join Date: Apr 2011
Device: 2x Sony PRS-350 (silver, blue); PRS-300 (†), Kindle Paperwhite
Yes, no problem so far. Working on the 350.

1)
Check if you wrote the path right. It is CASE SENSITIVE.

res:///Data/fonts/

2)
Do you use external CSS-files?
Check if path is right (case sensitive). Check CSS-file for errors.

A.
Analogus is offline   Reply With Quote
 
Enthusiast
Old 10-25-2011, 04:40 PM   #3
vishcompany
Addict
vishcompany can fool all of the people all of the time.vishcompany can fool all of the people all of the time.vishcompany can fool all of the people all of the time.vishcompany can fool all of the people all of the time.vishcompany can fool all of the people all of the time.vishcompany can fool all of the people all of the time.vishcompany can fool all of the people all of the time.vishcompany can fool all of the people all of the time.vishcompany can fool all of the people all of the time.vishcompany can fool all of the people all of the time.vishcompany can fool all of the people all of the time.
 
vishcompany's Avatar
 
Posts: 282
Karma: 138550
Join Date: Mar 2009
Device: Gen3(†); PB302(↓); PRS-350; T1
It works well here.

1. You add the fonts of your choice to the mentioned folder /fonts. Preferably each font comes in 4 variations (4 separate files): regular, bold, italic, bold-italic.

2. You add a .css file like the following example into this folder:
.../system/PRSPlus/epub

Example: fontin.css
Code:
@font-face {
 font-family: "Fontin";
 font-weight: normal;
 font-style: normal;
 src: url(res:///Data/fonts/Fontin-Regular.otf);
 }

 @font-face {
 font-family: "Fontin";
 font-weight: bold;
 font-style: normal;
 src: url(res:///Data/fonts/Fontin-Bold.otf);
 }

 @font-face {
 font-family: "Fontin";
 font-weight: normal;
 font-style: italic;
 src: url(res:///Data/fonts/Fontin-Italic.otf);
 }

 @font-face {
 font-family: "Fontin";
 font-weight: bold;
 font-style: italic;
 src: url(res:///Data/fonts/Fontin-SmallCaps.otf);
 }

 body {
 font-family: "Fontin"; 
 } 

 p { 
 font-size: 1.0em !important;
 text-align: justify !important;
 line-height: 130% !important;
 text-indent: 1.5em !important;
 margin-top: 0.5em !important; 
 margin-bottom: 0.5em !important; 
 }

 html { 
 font-family: Fontin !important;
 }

 .mainBody {
 font-family: Fontin !important;
 }

 .calibre {
 font-family: Fontin !important;
 }
Of course you have to adapt the file according to the used fonts. If you don't like the line spacing, you can change it with "line height".

Watch out, when editing the file.
Avoid using the regular windows editor (if you are using win), it can mess up the file. I use Notepad++. It's free and works great.
Avoid spaces in the filenames.

When everyting is done, unplug safely, choose the new font, which should now be listed in the appropriate PRS+ menu, open another book first and then your actual book again.
Enjoy.
vishcompany is offline   Reply With Quote
Old 10-25-2011, 06:53 PM   #4
ring0_event
Zealot
ring0_event can spell AND pronounce 'liseuse.'ring0_event can spell AND pronounce 'liseuse.'ring0_event can spell AND pronounce 'liseuse.'ring0_event can spell AND pronounce 'liseuse.'ring0_event can spell AND pronounce 'liseuse.'ring0_event can spell AND pronounce 'liseuse.'ring0_event can spell AND pronounce 'liseuse.'ring0_event can spell AND pronounce 'liseuse.'ring0_event can spell AND pronounce 'liseuse.'ring0_event can spell AND pronounce 'liseuse.'ring0_event can spell AND pronounce 'liseuse.'
 
Posts: 140
Karma: 39918
Join Date: Jan 2011
Device: Kindle3 (3G), PRS-950 (x2), PRS-T1
Here is a link which summarizes what was said (though the example was on a 950, it should apply to a 350):
http://www.anamardoll.com/search?q=prs%2B
ring0_event is offline   Reply With Quote
Old 10-26-2011, 11:31 AM   #5
spacebrew
Enthusiast
spacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud of
 
spacebrew's Avatar
 
Posts: 41
Karma: 27540
Join Date: Sep 2011
Location: North Dallas
Device: PRS-T1, PRS-350, Droid X2
Yeah I followed her post to the letter, and couldn't get it to work. I tried it with a capital letter in Data/fonts, and without. Where should /Data/fonts resolve to? The root? Or underneath /database?

I've tried most of this, but just can't get it to work. I sat here and messed with it for about four hours yesterday. Do I need all that extra code in the CSS? I just had the fonts and paths part. Thanks for all the replies, guys.

E: @vishcompany, I just used your css with my font, and the line spacing changed from one to the next, so the css is definitely being read. The font, however, is not changing.

Last edited by spacebrew; 10-26-2011 at 11:43 AM. Reason: added edit
spacebrew is offline   Reply With Quote
Old 10-26-2011, 11:49 AM   #6
Analogus
Fanatic
Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.
 
Analogus's Avatar
 
Posts: 522
Karma: 2155774
Join Date: Apr 2011
Device: 2x Sony PRS-350 (silver, blue); PRS-300 (†), Kindle Paperwhite
OK, some informations:

Make a folder on the root of the reader. Let's say 'Fonts'.
Copy the fonts you use in that folder.
In CSS point to the fonts in that way:

...
src: url(res:///Data/Fonts/fontname.ttf);
....

You see:
'Data' is the root of the reader. Write it exact this way: Data
'Fonts' is your folder for the fonts. It could also named 'Joe'. No problem in technical hinsight. Beware: Case sensitiv!
Font-names are case sensitiv too. Joe.ttf and joe.ttf aren't the same thing!

A.
Analogus is offline   Reply With Quote
Old 10-26-2011, 12:03 PM   #7
spacebrew
Enthusiast
spacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud of
 
spacebrew's Avatar
 
Posts: 41
Karma: 27540
Join Date: Sep 2011
Location: North Dallas
Device: PRS-T1, PRS-350, Droid X2
I finally got it. Thanks, Analogus, for your response. I checked what you put, and mine was like that. What it ended up being was I needed a div style in the css called .epub calling on that font. Jeez, what a bunch of work. Thanks guys.
spacebrew is offline   Reply With Quote
Old 10-26-2011, 12:14 PM   #8
Analogus
Fanatic
Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.
 
Analogus's Avatar
 
Posts: 522
Karma: 2155774
Join Date: Apr 2011
Device: 2x Sony PRS-350 (silver, blue); PRS-300 (†), Kindle Paperwhite
Your' wellcome

My experience to hold work low is to reformat epubs in Calibre over CONVERTING to epub. Even if the book is an epub I do this 'conversion':

EPUB --> EPUB.

That rewrites the CSS of the book to a more uniform kind.

After you have produced your CSS-files for PRS+ (I have approx. 15 styles covering common combinations of size, fonttype and linespace) it's very quick using them.

A.
Analogus is offline   Reply With Quote
Old 10-28-2011, 09:04 AM   #9
spacebrew
Enthusiast
spacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud of
 
spacebrew's Avatar
 
Posts: 41
Karma: 27540
Join Date: Sep 2011
Location: North Dallas
Device: PRS-T1, PRS-350, Droid X2
That sounds pretty nice. I'd be interested in why you needed so many styles. I sort of have a bad taste in my mouth about Calibre. I don't like the way it puts so much junk in everything it touches, and it's so clunky with the way it organizes stuff. I don't know, I'm just very meticulous about how I organize and whatnot, so I've been using Sigil to edit my epubs, or open them and edit them manually.

That sounds pretty smart though, converting from epub to epub to get a nice clean format. Tell me more about these styles though, yeah? What benefits, what features, bells and whistles, whatever - do you get from it?
spacebrew is offline   Reply With Quote
Old 10-28-2011, 10:10 AM   #10
Analogus
Fanatic
Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.
 
Analogus's Avatar
 
Posts: 522
Karma: 2155774
Join Date: Apr 2011
Device: 2x Sony PRS-350 (silver, blue); PRS-300 (†), Kindle Paperwhite
spacebrew:

OK, why so much CSS-styles?
Quite simple - to cover common combinations I want to use of fonts and fonts-sizes:

Font size increment of the PRS-x50-line is too large. To fine-adjust font-size I use styles up from 0.95 EM:
0.95, 0.96, 0.97, ..., 1.00, 1.10 = 7 styles. Font: NimbusMod
Most of the time I use 0.96, 0.97 or just deactivate custom styling.

For a second font you need the same amount of CSS-style... = 14 styles
I use Caecilia as second choice.

If you want cover at least 2 different lines spaces you would have to double it up to 28 styles!

A.
Analogus is offline   Reply With Quote
Old 10-30-2011, 09:37 AM   #11
k9reeder
Member
k9reeder can extract oil from cheesek9reeder can extract oil from cheesek9reeder can extract oil from cheesek9reeder can extract oil from cheesek9reeder can extract oil from cheesek9reeder can extract oil from cheesek9reeder can extract oil from cheesek9reeder can extract oil from cheese
 
Posts: 24
Karma: 1000
Join Date: Dec 2010
Device: Aluratek Libre Pro, Sony PRS-350
Quote:
Originally Posted by Analogus View Post
spacebrew:

0.95, 0.96, 0.97, ..., 1.00, 1.10 = 7 styles. Font: NimbusMod
Most of the time I use 0.96, 0.97 or just deactivate custom styling.
A.
Just curious about using NumbusMod. From what I can tell from an earlier thread, delphin said he needed to update the font to include "all four of the required font variations." Best I can tell from the thread, this revision is still pending from August (he doesn't seem to have responded in the thread since then). Anyway, since you seem to know what you're doing (and I don't ) are you happy/satisfied with using Nimbus as is?

Also, I'm interested in the issue of your refined font sizing. Would you share the complete code from one of your css files? I don't have a clue how it needs to be done. Thanks!

Thanks for any insight you or anyone might have.

Last edited by k9reeder; 10-30-2011 at 09:47 AM.
k9reeder is offline   Reply With Quote
Old 10-30-2011, 11:24 AM   #12
Analogus
Fanatic
Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.Analogus ought to be getting tired of karma fortunes by now.
 
Analogus's Avatar
 
Posts: 522
Karma: 2155774
Join Date: Apr 2011
Device: 2x Sony PRS-350 (silver, blue); PRS-300 (†), Kindle Paperwhite
k9reader:

CSS:
Accidentally this minutes I was thinking about a new thread for collecting useful CSS-code...

I've to admit that my understanding in CSS is VERY low. So I'm collecting CSS-snippets which I test with PRS+. Work in progress. In the different CSS-files I just alter the number of the font-size (0.96, 0.97, ...).


Nimbus Mod:

Yes, I think Delphin vanished. It is to hope voluntarily. Regarding his font-mod:
Bold and BoldOblique is missing. But that doesn't bother me because the books I'm reading there is just very view text formatted that kind. And if, it doesn't look bad. To throw this fonts completely from the reader just because there is no 'real' bold font is ridiculous for me.


Important, beside the font itself to me is:
  • Text should be aligned on the left side
  • Not too much line space
  • No/very few white margins

CSS (work in progress) for the size 0.97:


Code:
@font-face 
{
  font-family: "serif"; 
  font-weight: normal; 
  font-style: normal; 
  src: url(res:///Data/fonts/NimbusMod.ttf); 
}

@font-face 
{
  font-family: "serif"; 
  font-weight: normal; 
  font-style: italic; 
  src: url(res:///Data/fonts/NimbusMod_I.ttf); 
}

body 
{
 font-family: "serif"; 
 margin:0em !important;
} 
 
@page 
{
margin-left:0em !important;
margin-right:0em !important;
margin-top:0.5em !important;
margin-bottom:0em !important;	
}

 html 
{ 
 font-family: serif !important;
}

p, div 
{ 
font-size: 0.97em !important;
text-align: left !important;
line-height: 115% !important;
margin:0em !important;
}

I have the suspicion that the '!important' statement doesn't work at all. It should override CSS in ePubs. So you could delete all this statements.

It would be fine to have the possibility to COMBINE CSS-code with PRS+ to reduce the number of files.
Collecting information regarding CSS & PRS+ coul be very useful.


A.

Last edited by Analogus; 10-30-2011 at 11:30 AM.
Analogus is offline   Reply With Quote
Old 10-30-2011, 10:12 PM   #13
k9reeder
Member
k9reeder can extract oil from cheesek9reeder can extract oil from cheesek9reeder can extract oil from cheesek9reeder can extract oil from cheesek9reeder can extract oil from cheesek9reeder can extract oil from cheesek9reeder can extract oil from cheesek9reeder can extract oil from cheese
 
Posts: 24
Karma: 1000
Join Date: Dec 2010
Device: Aluratek Libre Pro, Sony PRS-350
Thanks for the assistance, Analogus. I like that font so I'm going to give it a try. (I'd also be interested in a css code thread.) Thanks again!
k9reeder is offline   Reply With Quote
Old 10-31-2011, 04:42 PM   #14
spacebrew
Enthusiast
spacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud ofspacebrew has much to be proud of
 
spacebrew's Avatar
 
Posts: 41
Karma: 27540
Join Date: Sep 2011
Location: North Dallas
Device: PRS-T1, PRS-350, Droid X2
Very cool. That makes sense. I will check out how the different font sizes look on the device. Thanks again for your responses.
spacebrew is offline   Reply With Quote
Old 10-31-2011, 05:33 PM   #15
Ripplinger
350 Hoarder
Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.
 
Ripplinger's Avatar
 
Posts: 2,193
Karma: 2264035
Join Date: Dec 2010
Location: Midwest USA
Device: Sony PRS-350: 3 Silver, 2 Blue!; Kobo Glo
Could someone post a link to a freebie book where the .css style with !important included doesn't change the font for them? The .css posted above is pretty similar to mine, and I've yet to find a book where the font isn't changed to what I specify. It could be just that I've been lucky and haven't run into a really stubborn epub yet, but I'd like to know if there's something different about my .css or if it really has been just luck on my part.

And I also have a few different font sizes for different reading conditions. When outside and it's starting to get dark, I find if I swap to a bolder font, I can still get away with reading comfortably without the need for a light.
Ripplinger is online now   Reply With Quote
Reply

Tags
fonts, prs+, prs-350

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
DR800 Changing Fonts on DR800S fredb iRex 15 12-25-2011 05:15 AM
Changing fonts Vit-orekhov enTourage eDGe 4 07-20-2011 12:57 AM
Development Changing fonts Vit-orekhov enTourage eDGe 0 07-18-2011 01:06 AM
Changing fonts Soxendom OpenInkpot 2 01-03-2010 10:14 AM
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 12:24 AM.


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