View Single Post
Old 08-07-2012, 09:01 AM   #3
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 8,910
Karma: 40300000
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
MOBI (standard old MOBI not KF8) doesn't do CSS, so everything in your source & CSS is being converted/combined into something resembling HTML 3.2 by kindlegen/previewer. I imagine the conversion algorithm is doing its best to scale your font-sizes appropriately, but you must keep in mind that font size in the MOBI markup language is not determined by "em"—and even the stuff that does recognize "em" (width, height attributes), doesn't recognize fractional ems. Stuff gets rounded. Font size in MOBI markup is manipulated by the <font> tag. So everything in your CSS related to font size must be converted to something like <font size="6"> or <font size="+1">

So given varying elements (p, h1, h2, h3, etc...) being styled with fractional ems via CSS it's not inconceivable that a font size could actually end up being much larger than you intended when run through the conversion process.

Use Mobi_Unpack or calibre's debug output to see what's actually happening inside the MOBI markup language and adjust accordingly. Simpler is almost exclusively better when dealing with the MOBI format. Meaning if you need different sized headings ... then keep it simple: just use stock heading tags (h1, h2, h3) without the CSS font-size property and h3 will always be smaller than h2 in the resulting MOBI.

There's ePub... and then there's ePub formatted to be the source used to build a comparable MOBI. The trick is learning how to combine the two so that either format is only a tweak or two to a single source-tree away.

Last edited by DiapDealer; 08-07-2012 at 09:07 AM.
DiapDealer is online now   Reply With Quote