06-03-2010, 11:59 PM | #1 |
Junior Member
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. |
06-04-2010, 02:14 AM | #2 |
creator of calibre
Posts: 44,356
Karma: 23661992
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?
|
Advert | |
|
06-04-2010, 10:43 AM | #3 |
Junior Member
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. |
06-04-2010, 12:03 PM | #4 |
creator of calibre
Posts: 44,356
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Will be fixed in next release
|
06-04-2010, 12:07 PM | #5 |
Junior Member
Posts: 4
Karma: 10
Join Date: Jun 2010
Device: Kindle / iPad
|
Awesome! Thanks!
|
Advert | |
|
06-05-2010, 10:40 PM | #6 |
Junior Member
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.
|
|
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 |