Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 04-02-2011, 07:05 AM   #1
rglk
Member
rglk began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Mar 2011
Device: PC (Linux)
[SOLVED] Convert mobi to pdf with serif font, not Arial

I have a mobibook that I can convert with Calibre to a pdf (specifying margins and upscaling all fonts from 12 to 14 pt). With that I get a pdf that looks nice on my laptop but the text is in the Arial font which I don't like.

Various ebook readers (K4PC, MobiPocket reader, Calibre) all display this mobibook in various serif fonts, as set in their preferences, and when I unpack the mobibook with mobiunpack.py or Calibre (ebook-convert mobi to oeb), I get html source files that will be displayed in various web browsers in the latter's default fonts, generally set by me to Times New Roman. There doesn't seem to be any specification of a particular font face in the html files or css stylesheets produced by unpacking the mobibook. Why then is Calibre putting out the pdf in Arial? Can I set that to some other font face?

If Calibre can't do this, could I do it in pisa or wkhtmltopdf on the source html's? Without setting any special command line switches these two programs put out the pdf in Helvetica and Arial, resp., neither of which I like.

How can I convert that mobibook to a pdf with a serif font such as Garamond, Times New Roman or Georgia?

Last edited by rglk; 04-02-2011 at 04:16 PM. Reason: solved
rglk is offline   Reply With Quote
Old 04-02-2011, 07:14 AM   #2
ldolse
Wizard
ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.
 
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
Can't guarantee this will work, but try converting it to epub first and make sure the document's own css is set to use a serif font. My guess is the original doc is sans-serif. Then convert the epub to pdf.
ldolse is offline   Reply With Quote
Advert
Old 04-02-2011, 04:15 PM   #3
rglk
Member
rglk began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Mar 2011
Device: PC (Linux)
Quote:
Originally Posted by ldolse View Post
Can't guarantee this will work, but try converting it to epub first and make sure the document's own css is set to use a serif font. My guess is the original doc is sans-serif. Then convert the epub to pdf.
Thanks for your suggestion. When I use Calibre to convert from mobi to epub, I just get a single file file_name.epub, with no access to any stylesheet. When I convert mobi to oeb in Calibre (with ebook-convert) or unpack it with mobiunpack.py, I get access to the css stylesheets, but they turn out to have no specification of fonts whatsoever. I suppose that's left open in the mobi file, so that the font can be set in the ereader application.

I could of course edit the css file in the unpacked ebook, recompile it with kindlegen and then convert it e.g. in Calibre. But I found out that Calibre already offers the possibility of overriding the css through its "Extra CSS" option.

So here is what I did:

In Calibre 0.7.32 added the mobibook to the library, then converted it from mobi to pdf with the following settings:

In Look & Feel set Base font size to 16.0 pt
In the "Extra CSS" box added:

body{
font-family:Times New Roman, Georgia, serif;
}

In Page Setup set:
Output profile: Default Output Profile
Input profile: Mobipocket Books
Margins, left & right: 144 pt
Margins, upper & lower: 36 pt

In PDF Output set: letter, portrait

With these settings one gets a PDF with 8.5 x 11 in. pages with 2 in. horizontal margins and 0.5 in. vertical margins, and all the text is in Times New Roman.
rglk is offline   Reply With Quote
Old 04-02-2011, 07:52 PM   #4
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: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by rglk View Post
Thanks for your suggestion. When I use Calibre to convert from mobi to epub, I just get a single file file_name.epub, with no access to any stylesheet.
Use the tweak ePub feature in the right click menu to expand the epub and access the css file or open the epub in Sigil to access the css file.

Quote:
Originally Posted by rglk View Post
So here is what I did:

In Calibre 0.7.32 added the mobibook to the library, then converted it from mobi to pdf with the following settings:
...
It sounds like you got it worked out.
DoctorOhh is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Serif font for JBL demingite Ectaco jetBook 3 12-13-2010 09:41 PM
how to get a serif font to work in an epub Ray Tayek Calibre 3 11-29-2010 05:36 PM
Best Serif font for KDX PDF? Ugly anti-aliasing guiyoforward Amazon Kindle 9 08-14-2010 09:35 AM
arial is default font? sjohnson717 Sony Reader 4 05-24-2008 07:45 PM
Do you prefer the Reader's serif or its sans serif font? (poll) Alexander Turcic Sony Reader 9 11-25-2006 12:15 PM


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


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