Hello everyone,
I own a kindle paperwhite and a regular kindle. I transferred my whole collection of book on the new device. Everything is ok except one book which has a broken TOC on the paperwhite while it works on the regular kindle. I contacted amazon and they told me they informed the editor who is in charge of updating the book and fixing the problem. This process needs some time so I have to wait.

I thought i could fix the problem using calibre...I was half successful. Let me explain: the book from amazon is a mobi ebook. I tried to convert it to azw3 format with default options. The result is a file which has a size double than the original one and a working TOC. The bad news is that whenever on the page a snippet of code appears (it's a programming book) its font is waay to small. On the original file it used to be displayed correctly, with a different font but the size was ok.

How can I tell calibre to ignore all possible font conversions (snippets of code are transformed into images) and just make it fix the TOC?

Thanks for your reply. I've tried selecting 'disable font size rescaling' or 'disable heuristic processing' but the result is always the same...I may add it takes more than usual to convert this book. Here's the log http://pastebin.com/s3Fvd0pr . I hope it help sorting this problem out.