View Single Post
Old 06-22-2021, 03:56 PM   #14
jhowell
Grand Sorcerer
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 7,116
Karma: 92190133
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
I will repeat the two comments that I posted to the calibre bug tracker here in case they are on interest to anyone following this discussion.

----------------------------

This problem was first noticed in the Kindle for iOS app which uses the old MOBI part of the file.

In the original EPUB the file 003.xhtml starts with "<p class="saltoinicio asangre">Rwe jfbnmv qw ey Ydfjdh cxw xtytccn". The style for class "saltoinicio" in style.css is ".saltoinicio { margin-top:33%; }". So the intent is to have the paragraph start part of the way down the screen.

The corresponding old MOBI content produced by calibre is "<p height="150em" width="0pt" align="justify">Rwe jfbnmv qw ey Ydfjdh cxw xtytccn". The 33% value has been converted to 150em. This makes no sense to me. It implies that a screen width of 450em was used as the conversion factor.

This huge value causes the MOBI renderer to perform incorrectly in the Kindle for iOS app resulting in the initial text of that paragraph not being displayed.

When the same EPUB is run through kindlegen the old MOBI part of the result instead has "<p height="33%" width="0" align="justify">Rwe jfbnmv qw ey Ydfjdh cxw xtytccn". This renders much better when tested using the Kindle for iOS app and also on an old Kindle 2 device.

----------------------------

I was able to determine what is happening in this case.

I always convert using the Tablet profile in order to prevent images from being downsized. It did not occur to me that the screen size set by the Output Profile also comes into play during conversion of sizes in the content of the book. Selecting the Kindle output profile (525x640 pixels) instead of Tablet (10,000x10,000 pixels) changed the top margin from 150em down to a far more reasonable value of 5em. The resulting MOBI file renders fine under Kindle for iOS.

In the end this is a case of user error. Still, it would be nice if there was a way to avoid downsizing images while at the same time having reasonable screen dimensions for size calculations during conversion.
jhowell is offline   Reply With Quote