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 06-03-2010, 11:59 PM   #1
hardvice
Junior Member
hardvice began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jun 2010
Device: Kindle / iPad
Losing relative font sizes on conversion

I'm in the process of converting a bunch of MOBI .PRC books to .EPUB. The original html files from which I built the MOBI files (using Mobipocket Creator) use relative font sizes in the CSS. For example, the CSS class for the book title uses font-size: x-large; while the class for chapter titles uses font-size: large;.

When I convert the MOBI books in Calibre, everything comes out as normal-sized text. If I open the .EPUB book in Sigil, it appears all of the classes of different sizes are being combined as class=calibre4.

I can edit the books in Sigil to restore the relative font sizes, but it's obviously a pain.

It seems like the font size rescaling in the Look & Feel page during conversion should take care of this, but it's not. None of the source files contain any explicit (i.e. point-size) font size declarations; they use font-size: normal; for body text instead, and I'm guessing that's the problem.

If I use the font size rescaling in Calibre (currently set as base font size 12.0 and font size key 5.0, 7.0, 9.0, 12.0, 13.5, 17.0, 20.0, 22.0, 24.0), I get the same result--all text is the same size. If I explicitly disable font size rescaling, I get the same results.

I'm currently using the Default Input Profile and the iPad output profile.

Is there anything I can change during the conversion to preserve these font sizes? I'm converting a couple hundred files, so anything I can do in Calibre would be preferred to editing all the input or output files manually.

Thanks in advance.
hardvice is offline   Reply With Quote
Old 06-04-2010, 02:14 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 25,248
Karma: 4961457
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
In PRC files all font sizes are remapped to use the <font> html tag. calibre handles these just fine. Are the relative font sizes showing up when you view the prc file?
kovidgoyal is offline   Reply With Quote
 
Enthusiast
Old 06-04-2010, 10:43 AM   #3
hardvice
Junior Member
hardvice began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jun 2010
Device: Kindle / iPad
Hey Kovid,

Thanks for the fast reply!

The PRC files--both the original source file and the one in Calibre's library--display the fonts correctly.

I've mocked up a sample file and am attaching it here. Included are the original HTML document, the PRC built by Mobipocket Creator, and the EPUB built by Calibre.
Attached Files
File Type: zip sample_ebook.zip (103.9 KB, 57 views)
hardvice is offline   Reply With Quote
Old 06-04-2010, 12:03 PM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 25,248
Karma: 4961457
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Will be fixed in next release
kovidgoyal is offline   Reply With Quote
Old 06-04-2010, 12:07 PM   #5
hardvice
Junior Member
hardvice began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jun 2010
Device: Kindle / iPad
Awesome! Thanks!
hardvice is offline   Reply With Quote
Old 06-05-2010, 10:40 PM   #6
hardvice
Junior Member
hardvice began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jun 2010
Device: Kindle / iPad
Just wanted to let you know that I've just installed 0.70 and this conversion is now working perfectly. Thanks so much! This will save me a ton of time.
hardvice 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
font sizes ? rbeset ePub 21 07-22-2010 03:49 PM
Font Sizes Roya Sigil 7 06-18-2010 09:28 AM
Font Sizes brewt Amazon Kindle 9 06-12-2009 03:03 PM
Font Sizes on DX wallcraft Amazon Kindle 1 05-06-2009 11:08 PM
Only five font sizes in K2? KlondikeGeoff Amazon Kindle 6 02-25-2009 10:21 PM


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


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