01-16-2011, 12:11 PM | #1 |
Evangelist
Posts: 454
Karma: 270240
Join Date: Aug 2009
Device: Sony PRS 650, PocketBook 360, Astak PocketPro (RIP), Tungsten T3
|
CSS Suggestions for the Sony
My apologies if this has been talked to death already, but a search through the forums didn't answer all of my questions. As has been noted by many people already, the default small font on the 650 is a little too small and the default medium is really big. Also, some of the ePubs I've read come with large margins, especially in the medium size. I found the PDF with instructions on how to change the default font type and I know that Calibre can do some formatting, including extra CSS, during conversion.
I remove the DRM and use Calibre to convert everything because I like having the book cover and description at the beginning of each book. I'm looking for suggestions from the audience on what changes during conversion work well to increase the small font just a bit and to change the margins so that the text fills the reader screen. I recognize that these preferences are very user specific, but am hoping for at least a starting point for my tinkering. |
01-16-2011, 06:49 PM | #2 |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Re: Font-size. I use Charis SIL as my default serif font and have found that converting with Look&Feel - Base font size set to 11pt is just about right for me when I view an EPUB on the PRS-650 on the zoom Medium setting.
Fixing the margins will be different for every EPUB. You need to use calibre's Tweak-EPUB feature to unzip the EPUB and have a look at what's in the .css file. Look for occurrences of margin-left: and margin-right: and reduce the attribute values you find. e.g. if you find margin-left:3em; changing it to margin-left:0; will remove the left margin. Beware that unless you're familiar with a bit of HTML and CSS this could be assault with a blunt instrument if you change margins for the wrong bit of text. Before you try it the first time, make sure you keep a copy of the pre-tweaked EPUB just in case. The other place that publishers like to hide ridiculous margins is inside a file called page-template.xpgt, which only exists in some EPUBs. Poke around inside the EPUB to see if you can find one. You can open it with a text editor. They won't all be exactly the same but here is a short extract from one of mine Code:
<fo:simple-page-master master-name="single_column" margin-bottom="1.5em" margin-top="1.5em" margin-left="1.5em" margin-right="1.5em" >
<fo:region-body />
</fo:simple-page-master>
Code:
<fo:simple-page-master master-name="single_column" margin-bottom="1.5em" margin-top="1.5em" margin-left="0em" margin-right="0em" >
<fo:region-body />
</fo:simple-page-master>
If all's gone well so far save your changes and press the "Rebuild EPUB" button. View the EPUB in the Viewer to make sure there have been no obvious mistakes. To the best of my knowledge, the margins from page-template.xpgt are not visible in the Viewer so you may need to view the EPUB on the PRS650 to be absolutely sure they've gone. |
Advert | |
|
01-17-2011, 12:10 AM | #3 |
my parent's oops...
Posts: 466
Karma: 1477570
Join Date: Feb 2009
Device: Vx->Handera->Clie-> Axim->505->650->KPW/Aura ->iOS/L2
|
I replaced the fonts using the @font-face css. To make the small size look really nice, I simply used the bold version of the font as my standard and then used the heavy version of the font for my bold (plus you should also add the italic versions of each). Here is my code:
Code:
@font-face { font-family: "Caecilia"; font-weight: normal; font-style: normal; src: url(res:///Data/fonts/CaeciliaLTStd-Bold.otf); } @font-face { font-family: "Caecilia"; font-weight: bold; font-style: normal; src: url(res:///Data/fonts/CaeciliaLTStd-Heavy.otf); } @font-face { font-family: "Caecilia"; font-weight: normal; font-style: italic; src: url(res:///Data/fonts/CaeciliaLTStd-BoldItalic.otf); } @font-face { font-family: "Caecilia"; font-weight: bold; font-style: italic; src: url(res:///Data/fonts/CaeciliaLTStd-HeavyItalic.otf); } p { margin-top: 0pt; margin-bottom:0pt;padding:0pt; text-indent:20pt } body { font-family: "Caecilia", serif; } |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
css pseudo elements and adjacent combinators in extra css? | ldolse | Calibre | 2 | 12-21-2010 05:09 PM |
Styling Elements in CSS - ADE and Sony | toskpro | Sony Reader | 0 | 07-19-2010 01:55 PM |
Sony PRS-505 style.css and calibre | goose61282 | Calibre | 0 | 02-26-2010 08:54 AM |
Basic CSS For Sony Reader | ExiledV20 | Sigil | 7 | 02-05-2010 02:38 AM |
Sony firmware update wish list & tech suggestions | Dahak | Sony Reader | 6 | 07-07-2009 11:30 PM |