What Jon is talking about is adding the monospace font to the fonts directory in the root of your Kobo's storage which will allow you to use <code>...</code> or font-family: monospace;. It will not work with other brands. Embedding a monospace font is probably the most general solution. Looking at your sample CSS, the font source may be incorrect. The following works for me with the fonts in the ePub's OEBPS/Fonts directory:
Code:
@font-face {
font-family: 'Courier Prime';
font-weight: bold;
font-style: normal;
src: url('../Fonts/CourierPrime-Bold.ttf');
}
@font-face {
font-family: 'Courier Prime';
font-weight: bold;
font-style: italic;
src: url('../Fonts/CourierPrime-BoldItalic.ttf');
}
@font-face {
font-family: 'Courier Prime';
font-weight: normal;
font-style: italic;
src: url('../Fonts/CourierPrime-Italic.ttf');
}
@font-face {
font-family: 'Courier Prime';
font-weight: normal;
font-style: normal;
src: url('../Fonts/CourierPrime-Regular.ttf');
}
I've attached a test epub using the embedded font so you can see the structure of the ePub which is rather important to know where the various bits and pieces live on the path internal to the ePub. Also note that I am using Sigil as the ePub editor.