Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 09-23-2011, 07:53 AM   #1
tommystery
Member
tommystery began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Jun 2011
Device: none
PRS+ Change Font Size?

Hello again,

So after tinkering with PRS+ for a while I've been able to get some custom fonts onto the device. One of the things I've noticed however is that I cannot change the font size through css. I read several posts that suggested adding the line font-size: 1em; to the body { } portion of the custom css but this seems to have no effect. I have tried different methods to experiment (1em, 2em, 5pt, 20pt, 105%, 120%) as well as including the !important tag and they have had no effect.

Supposedly this method is supposed to work to modify the M size font (won't work with the other sizes as these are rerendered) but I have not had any luck getting it to work.

On the contrary, margins, line spacing, padding, font style, etc. all take effect so my setup is working properly.

Could someone who has successfully changed their font size using this method please offer some advice?

Thanks.
tommystery is offline   Reply With Quote
Old 09-23-2011, 02:15 PM   #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
tommy,

did you try if it works with S level zoom? If memory serves me right, it's the default one, not M.
kartu is offline   Reply With Quote
 
Enthusiast
Old 09-23-2011, 02:29 PM   #3
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
- CSS should work with every zoom level (tested it right now on my reader).
- kartu is right. S is default

Question: Did you test with EPUBs? Not PDF, RTF or another format?
Hint: CSS works just with EPUB

Question: Did you try other EPUB-files?
Hint: I would be surprised if this behaviour you decribe stays in all EPUBs...

Question: Are you able to edit EPUB files?
Hint: If yes, delete the CSS file inside of the EPUB file and try once more.

My suspicion is that the 'important!'-statement doesn't work at all. I very often have to delete/alter the CSS-file inside the file to get the CSS-file for PRS+ working. But my knowledge in CSS is very limited. Therefore deleting the EPUB-CSS.

A.
Analogus is offline   Reply With Quote
Old 09-23-2011, 04:25 PM   #4
jackie_w
Wizard
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: 2,710
Karma: 3818505
Join Date: Sep 2009
Location: UK
Device: Sony PRS-350, PB360, Kobo Glo/AuraHD/Aura6"
Quote:
Originally Posted by tommystery View Post
Could someone who has successfully changed their font size using this method please offer some advice?
When font-size in your PRSPlus customised css doesn't work, it's usually because of other conflicting font-size attributes already in the css file within your epub.

I've attached my general font tester epub. Copy it to your Sony and see whether you can get the font-size to vary by changing your PRSPlus css. If this epub works (it does for me) then the problem lies in your own epub's css.

If you're a Calibre user, an epub-to-epub conversion can sometimes help with font-size problems.

[Edit:] Please see post #7 for missing info
Attached Files
File Type: epub EPUB_FontSize.epub (93.0 KB, 124 views)

Last edited by jackie_w; 09-24-2011 at 11:08 AM. Reason: missing info
jackie_w is offline   Reply With Quote
Old 09-24-2011, 05:59 AM   #5
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 8,782
Karma: 12516053
Join Date: Feb 2009
Location: North Carolina
Device: Nexus 7
Quote:
Originally Posted by jackie_w View Post
When font-size in your PRSPlus customised css doesn't work, it's usually because of other conflicting font-size attributes already in the css file within your epub.
I find this to be true. I convert all of my books in calibre and set font size scaling during the conversion. Afterwards no matter what I specify in the body of my css nothing happens.
DoctorOhh is offline   Reply With Quote
Old 09-24-2011, 07:22 AM   #6
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: 36,248
Karma: 17204706
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
Quote:
Originally Posted by dwanthny View Post
I find this to be true. I convert all of my books in calibre and set font size scaling during the conversion. Afterwards no matter what I specify in the body of my css nothing happens.
Calibre conversions use <body class="calibre"> and in the CSS Calibre has font-size: 1em;. So what happens is that your font-size in body fails. What you could try is to add in a calibre class with just a font size. So you'd have the same font size in body body and calibre. But there could be other CSS directives changing the font size. I see a lot of ePub where the font size is set in other classes. So for example, you have <p class="tx"> and in the CSS, you have under .tx font-size: small;. Annoying I know and nothing you can do about it other then trying the most common classes publishers use and setting font sizes there. If the classes in your overriding CSS aren't used, it won't be an issue.

Some common CSS entries to put in your font-size...calibre, tx1, tx, indent, noindent, body, p
JSWolf is online now   Reply With Quote
Old 09-24-2011, 09:17 AM   #7
jackie_w
Wizard
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: 2,710
Karma: 3818505
Join Date: Sep 2009
Location: UK
Device: Sony PRS-350, PB360, Kobo Glo/AuraHD/Aura6"
I'm such an idiot for only giving half-an-answer

I had completely forgotten that in my PRSPlus css I have the body set like this:
Code:
body, body.calibre, body.calibre1, body.calibre2, body.calibre3  {
font-family: serif;
font-size: 0.85em !important}
This should catch most of the Calibre conversions. Thanks for making me think a bit harder, dwanthny and JSWolf.

In addition, during conversion, Calibre seems to replace epub css like font-size:small or font-size:10pt with a suitable font-size:??em; equivalent which is more likely to work the way you want it to with PRSPlus.
jackie_w is offline   Reply With Quote
Old 09-24-2011, 10:49 AM   #8
tommystery
Member
tommystery began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Jun 2011
Device: none
Hi guys,

First off, thank you for the overwhelming number of responses. I have been lurking on this community while deciding to purchase an ereader for over a year. I haven't posted much because I've mostly been reading comparison and reviews of what other people were saying. Since I still had a fairly large collection of unread trade paperbacks I wanted to get through those before I got an eink device.

I actually had a hunch yesterday that there might be a conflicting css in the epub so I exploded one epub and removed the stylesheet. It still didn't seem to work. I'm glad that Jackie left the test file because I was able to test further and still see that my css wasn't working.

Adding body.calibre, etc... made the test file work; and it does in fact change the font size for all of the font sizes (not only S or M as I had read elsewhere). I should probably add calibre, tx1, tx, indent, noindent to my css definition as well...

In the spirit of helping other who might stumble upon this thread, here is my final, general css file:

Quote:
@page {
margin-bottom: 0pt;
margin-left: 1pt;
margin-right: 1pt;
margin-top: 6pt;
}

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

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

@font-face {
font-family: "NimbusMod";
font-weight: bold;
font-style: italic;
src: url(res:///Data/fonts/timesbi.ttf);
}

body, body.calibre, body.calibre1, body.calibre2, body.calibre3, body.tx, body.tx1, body.indent, body.noindent {
text-align: justify;
font-family: NimbusMod, "Times New Roman", Verdana, Arial;
font-size: 0.85em;
line-height: 1em;
}
Let me know if there's any way I can improve it.
tommystery is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to change font size and font style? butterbescotch Sigil 20 09-06-2013 08:22 PM
How to change font size? Mike L Calibre 17 07-04-2013 11:39 AM
Can't change font or font size in ereaders jmacg Sigil 30 10-23-2010 09:21 PM
Change font size? Jabby Sigil 1 10-23-2010 05:59 PM
Font Size Change Phonella Calibre 10 01-28-2009 12:46 PM


All times are GMT -4. The time now is 12:18 PM.


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