Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 01-16-2011, 12:11 PM   #1
polly
Evangelist
polly ought to be getting tired of karma fortunes by now.polly ought to be getting tired of karma fortunes by now.polly ought to be getting tired of karma fortunes by now.polly ought to be getting tired of karma fortunes by now.polly ought to be getting tired of karma fortunes by now.polly ought to be getting tired of karma fortunes by now.polly ought to be getting tired of karma fortunes by now.polly ought to be getting tired of karma fortunes by now.polly ought to be getting tired of karma fortunes by now.polly ought to be getting tired of karma fortunes by now.polly ought to be getting tired of karma fortunes by now.
 
polly's Avatar
 
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.
polly is offline   Reply With Quote
Old 01-16-2011, 06:49 PM   #2
jackie_w
Grand Sorcerer
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: 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>
If you've got one, again change the margin-left and margin-right settings.
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>
I only bother changing the margins in the section named "single_column"

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.
jackie_w is offline   Reply With Quote
Advert
Old 01-17-2011, 12:10 AM   #3
slantybard
my parent's oops...
slantybard ought to be getting tired of karma fortunes by now.slantybard ought to be getting tired of karma fortunes by now.slantybard ought to be getting tired of karma fortunes by now.slantybard ought to be getting tired of karma fortunes by now.slantybard ought to be getting tired of karma fortunes by now.slantybard ought to be getting tired of karma fortunes by now.slantybard ought to be getting tired of karma fortunes by now.slantybard ought to be getting tired of karma fortunes by now.slantybard ought to be getting tired of karma fortunes by now.slantybard ought to be getting tired of karma fortunes by now.slantybard ought to be getting tired of karma fortunes by now.
 
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;
}
For replacing the fonts on the prs models, I have the instructions that I downloaded from another thread. Here is also a pic of the font at small on my old 505s.
Attached Thumbnails
Click image for larger version

Name:	IMG_4143.jpg
Views:	167
Size:	71.4 KB
ID:	64978  
Attached Files
File Type: pdf Adding-Fonts-to-a-Sony-Reader.pdf (381.8 KB, 114 views)
slantybard is offline   Reply With Quote
Reply


Forum Jump

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


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


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