Ok, I did patch to be able to use publisher font family, and now it uses a different font for the code than it does for everything else, even if I choose a custom font, but it still isn't using a monospaced font! I did also include the patch for Courier* fonts, and I have the "Courier New" font installed.
Interestingly, one effect that I'm seeing is that now the menu for selecting a font shows all the fonts in italic, but when I select them, they aren't italic. Not sure why that happened (and it could have happened when the kobo updated to 4.3.8945 earlier today), but I can definitely live with that.
So, maybe the problem is in my css file?
What I did was I looked through a page or two of the book, and I found the areas where there was code-listings, and looked at the <div>, <pre> and <code> tags that were used around code listings. Then, I went to the css file, and found the equivalent css listings for those tags. I added a "font-family:monospace;" to those css areas. It is working in calibre's preview area, but doesn't seem to be coming over correctly on the kobo?
It is convenient that in this book, all the parts that should be monospace are also blue, so I verified by making sure that every place in the css that has "color:blue" also has "font-family:monospace" after it.
Once again, it also is working correctly in the epub reader, but not in the kepub reader. So weird!
|