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

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 01-22-2010, 02:43 AM   #16
ChristopherTD
Addict
ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.
 
ChristopherTD's Avatar
 
Posts: 303
Karma: 1003456
Join Date: Apr 2008
Location: London. UK
Device: Marvin Reader on iPad Air (via Calibre)
Most of my books are converted from LIT and PDB and the CSS snippet below added into Calibre works beautifully, apart from one book that contained dodgy PML. For me though, one of the most important aspects is overriding the default font to something a bit darker (Georgia or DroidSerif are good choices). In books purchased in ePub format the styles are more diverse and it is hard to work out what to add to the Calibre code - but there is a neat Java applet now that lets me fiddle with the CSS directly for those. Hooray.

For conversions from PDB/LIT I use the following (recklessly plundered from various MR threads)





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

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

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

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




body {
font-family: "DroidSerif", serif;
}

p {
line-height: 130%
}

div {
line-height: 130%
}
ChristopherTD is offline   Reply With Quote
Old 01-22-2010, 03:19 AM   #17
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,735
Karma: 12488297
Join Date: Feb 2009
Location: North Carolina
Device: Nexus 7
Quote:
Originally Posted by ChristopherTD View Post
Most of my books are converted from LIT and PDB and the CSS snippet below added into Calibre works beautifully, apart from one book that contained dodgy PML. For me though, one of the most important aspects is overriding the default font to something a bit darker (Georgia or DroidSerif are good choices).

~...~...

@font-face {
font-family: "DroidSerif";
font-weight: normal;
font-style: normal;
src: url(res:///Data/fonts/DroidSerif-Regular.ttf);
}
I'm curious, do you actually place this font on your 600?

I am lucky enough to be able to use the PRSplus hack on my PRS-505. This lets me place what fonts I want to use (I use fontin fonts) on my reader and change the font, font size, line height, margins etc on the fly by adjusting my style.css file on the reader. This applies my desired setup to every epub I read, including DRM infected epubs.

Quote:
Originally Posted by ChristopherTD View Post
In books purchased in ePub format the styles are more diverse and it is hard to work out what to add to the Calibre code - but there is a neat Java applet now that lets me fiddle with the CSS directly for those. Hooray.
This applet sounds like an excellent tool for our community.
DoctorOhh is online now   Reply With Quote
Old 01-22-2010, 03:27 AM   #18
ChristopherTD
Addict
ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.
 
ChristopherTD's Avatar
 
Posts: 303
Karma: 1003456
Join Date: Apr 2008
Location: London. UK
Device: Marvin Reader on iPad Air (via Calibre)
Quote:
Originally Posted by dwanthny View Post
I'm curious, do you actually place this font on your 600?

I am lucky enough to be able to use the PRSplus hack on my PRS-505. This lets me place what fonts I want to use (I use fontin fonts) on my reader and change the font, font size, line height, margins etc on the fly by adjusting my style.css file on the reader. This applies my desired setup to every epub I read, including DRM infected epubs.



This applet sounds like an excellent tool for our community.
Indeed I do - I put them on both the main reader and the memory card for good measure. The PRSPLUS hack sounds ideal, but I am a little wary of applying a similar thing (if it even exists) to the PRS-600 until I know it a bit better. Then I will have a good chance of determining whether odd behaviour is native or introduced!

The Java tool is described in this thread:

http://www.mobileread.com/forums/showthread.php?t=70600
ChristopherTD is offline   Reply With Quote
Old 01-22-2010, 03:33 AM   #19
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,735
Karma: 12488297
Join Date: Feb 2009
Location: North Carolina
Device: Nexus 7
Quote:
Originally Posted by ChristopherTD View Post
The PRSPLUS hack sounds ideal, but I am a little wary of applying a similar thing (if it even exists) to the PRS-600
Currently There are no hacks for the 600.

Quote:
Originally Posted by ChristopherTD View Post
The Java tool is described in this thread:

http://www.mobileread.com/forums/showthread.php?t=70600
Thanks for the info.
DoctorOhh is online now   Reply With Quote
Old 01-23-2010, 05:27 PM   #20
soilwork
useR!
soilwork will become famous soon enoughsoilwork will become famous soon enoughsoilwork will become famous soon enoughsoilwork will become famous soon enoughsoilwork will become famous soon enoughsoilwork will become famous soon enough
 
soilwork's Avatar
 
Posts: 299
Karma: 651
Join Date: Nov 2007
Location: NY
Device: Sony PRS-505 & Entourage eDGe & iRiver Story HD
It also can be done by using ebook.convert.exe in command-line

Using ebook-convert.exe in command-line may be simpler than using GUI or opening CSS in epub file to modify it by hand. Since I almost never use calibre GUI, I am not sure whether or how this will affect the way GUI handles the database so please bear that in mind. Also, it may be useful only for those who are comfortable with command line.

I made a simple batch file named "2epub.bat" to convert files to epub with the setting I prefer.
Code:
REM 2epub.bat
ebook-convert %1 "%~n1%~x1.epub" --extra-css="C:\Program Files\calibre\fontin.css" --base-font-size 15 --no-default-epub-cover %2 %3 %4 %5 %6 %7 %8 %9
I put this batch file and the following "fontin.css" in Program Files\calibre directory. "fontin.css" is CSS file to support embedded fonts placed on PRS505. For more information, please refer to
http://www.mobileread.com/forums/showthread.php?t=36361
Code:
/* CSS for using Fontin fonts*/
/* Note that the Fontin fonts should be located in /fonts/ directory of Sony reader */
/* Modified: 2010 01 15 */
@font-face {
  font-family: "Fontin";
  font-weight: normal;
  font-style: normal;
  src: url(res:///Data/fonts/Fontin-Regular.ttf);
}
@font-face {
  font-family: "Fontin";
  font-weight: bold;
  font-style: normal;
  src: url(res:///Data/fonts/Fontin-Bold.ttf);
}
@font-face {
  font-family: "Fontin";
  font-weight: normal;
  font-style: italic;
  src: url(res:///Data/fonts/Fontin-Italic.ttf);
}

body {
  font-family: "Fontin", serif;
  line-height: 120%;
  widows: 0;
  orphans: 0;
}

Using these files, I can make "filename.ext.epub" from "filename.ext" without overwriting the original file.
Code:
2epub "filename.ext"
For example,
source file name -> output file name will look as follows.
--------------------------------------
filename.epub -> filename.epub.epub
filename.mobi -> filename.mobi.epub
filename.lrf -> filename.lrf.epub

This way, if the original source file is epub, the source file is not overwritten. Another reason is that I would like to track what is the source of the final epub file. For example, if I have multiple source files (e.g. freebies from Smashwords), I try converting from epub, mobi, lrf and leave the best one and it helps to know what is the best source file to use.

Last edited by soilwork; 03-11-2010 at 08:56 PM. Reason: Typo
soilwork is offline   Reply With Quote
Old 02-10-2010, 04:05 PM   #21
JanuaryF
Connoisseur
JanuaryF began at the beginning.
 
JanuaryF's Avatar
 
Posts: 54
Karma: 38
Join Date: Oct 2009
Location: Waterloo, Canada
Device: Sony PRS-505 (Red)
Quote:
Originally Posted by ChristopherTD View Post
Looking further at a particularly obstinate title (Well of Ascension by Brandon Sanderson) ...
How funny is that? The book that brought me to this post was "Well of Ascension"!

I have a 505, so I'm going to give PRSPlus a try...

Thanks,
January
JanuaryF is offline   Reply With Quote
Old 02-11-2010, 02:50 AM   #22
ChristopherTD
Addict
ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.ChristopherTD ought to be getting tired of karma fortunes by now.
 
ChristopherTD's Avatar
 
Posts: 303
Karma: 1003456
Join Date: Apr 2008
Location: London. UK
Device: Marvin Reader on iPad Air (via Calibre)
That is amusing! I did get that title sorted out, and most of the others beaten into submission. The combination of the ePubTweaker.jar and Sigil gets rid of most mischief. The current book "Dragonfly Falling" by Adrian Tchaikovsky was purchased as ePub but had odd Ă characters at each pagebreak, saving it in Sigil sorted that out. Incredible that nobody even opened it in ADE to see that it looked OK before releasing it!
ChristopherTD 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
Replace DEFAULT epub fonts! (PRS-505) pepak Sony Reader Dev Corner 70 01-22-2011 07:20 PM
PRS-600 Replace DEFAULT epub fonts! (PRS-600) pepak Sony Reader 31 06-22-2010 11:34 AM
converting to epub with my css fbrzvnrnd Calibre 3 04-15-2010 02:46 AM
find and replace, epub ampsonic Reading and Management 3 03-02-2010 03:20 AM
epub, ADE and CSS puzzle pdurrant ePub 3 09-03-2009 01:07 PM


All times are GMT -4. The time now is 03:22 AM.


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