![]() |
#1 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
![]() |
#2 |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 568
Karma: 2170348
Join Date: Apr 2011
Device: 2x Sony PRS-350; PRS-300 (†), Paperwhite (†), Voyage
|
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. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 283
Karma: 138550
Join Date: Mar 2009
Device: Gen3(†); PB302(↓); PRS-350; T1; voyage
|
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; } 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. |
![]() |
![]() |
![]() |
#4 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 142
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 |
![]() |
![]() |
![]() |
#5 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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 |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 568
Karma: 2170348
Join Date: Apr 2011
Device: 2x Sony PRS-350; PRS-300 (†), Paperwhite (†), Voyage
|
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. |
![]() |
![]() |
![]() |
#7 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.
|
![]() |
![]() |
![]() |
#8 |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 568
Karma: 2170348
Join Date: Apr 2011
Device: 2x Sony PRS-350; PRS-300 (†), Paperwhite (†), Voyage
|
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. |
![]() |
![]() |
![]() |
#9 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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? |
![]() |
![]() |
![]() |
#10 |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 568
Karma: 2170348
Join Date: Apr 2011
Device: 2x Sony PRS-350; PRS-300 (†), Paperwhite (†), Voyage
|
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. |
![]() |
![]() |
![]() |
#11 | |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 173
Karma: 216716
Join Date: Dec 2010
Device: Sony PRS-350, Galaxy Tab S2, PW3(7th) Kobo H2O (1st), Forma
|
Quote:
![]() 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. |
|
![]() |
![]() |
![]() |
#12 |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 568
Karma: 2170348
Join Date: Apr 2011
Device: 2x Sony PRS-350; PRS-300 (†), Paperwhite (†), Voyage
|
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:
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. |
![]() |
![]() |
![]() |
#13 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 173
Karma: 216716
Join Date: Dec 2010
Device: Sony PRS-350, Galaxy Tab S2, PW3(7th) Kobo H2O (1st), Forma
|
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!
|
![]() |
![]() |
![]() |
#14 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.
|
![]() |
![]() |
![]() |
#15 |
350 Hoarder
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,574
Karma: 8281267
Join Date: Dec 2010
Location: Midwest USA
Device: Sony PRS-350, Kobo Glo & Glo HD, PW2
|
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. |
![]() |
![]() |
![]() |
Tags |
fonts, prs+, prs-350 |
|
![]() |
||||
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 |