View Single Post
Old 02-10-2020, 10:12 PM   #39
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,118
Karma: 92500001
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
Quote:
Originally Posted by joe 1 View Post
I converted my epub to mobi, and emailed it to my Kindle account. The doc looks fine -- I see my monospace fonts where they should be.

Next, I used kindlegen to convert my epub to mobi, and again emailed it to my Kindle acocunt. Now, all the text is the same proportional font -- no monospace anywhere.
You found another failure case that I had not tested. Emailing a MOBI file created by either calibre or kindlegen will result in MOBI7 format being delivered to the Kindle for iOS app since it does not support KF8 format.

The reason for the failure is that in MOBI7 format only the first font family name is retained by kindlegen, "Source Code Pro" in this case. But the MOBI7 renderer does not handle that font name, only "monospace" or "courier". It will work properly if you use "font-family: monospace" alone. (As NotJohn indicated using "font-family: courier, monospace;" also works.)

The reason that calibre conversion works in this case is that, unlike kindlegen, it converts any monospace font family to the HTML <tt> tag which is rendered in MOBI7 with a monospace font.

Last edited by jhowell; 02-10-2020 at 10:18 PM.
jhowell is offline   Reply With Quote