View Single Post
Old 03-08-2015, 05:09 PM   #3
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
To begin with, my best advice for getting css styles to work as coded is to read books as standard epub, not kepub. If you're a calibre user it would require using the standard KOBOTOUCH driver not the Kobo Touch Extended driver plugin.

However, to get monospace fonts requires some more work. Kobos don't have a built-in monospace font (odd, I know). You can try embedding the 4 monospace files (regular, italic, bold, bolditalic) into each and every book if you like but I prefer to sideload them once to the Kobo /fonts directory and then externally reference them from the epub. Read this post for more details about how to code the relevant css @font-face statements. I use HP's Dark Courier font, which is free.

If you haven't sideloaded fonts before post #1 of this thread should help.

If you're a calibre user and you don't want to hand-edit every epub, take a look at the Modify CSS option in the KOBOTOUCH driver. Adding the monospace @font-faces to the kobo_extra.css file on your Kobo will mean that they get auto-added to every epub during the calibre send-to-device process. This is the method I've been using for ages, it's painless and it works.

If the above isn't detailed enough feel free to ask and I can elaborate where necessary.
jackie_w is offline   Reply With Quote