Quote:
Originally Posted by Moonraker
Here are my two files.
The first using the "Courier New" font.
And the second using <code></code> tags.
I did have my <code></code> tags outside of the <p></p> tags but Calibre changed them to inside the </p></p>
I did have font-family: "Courier New", monospace in my CSS sheet
|
I tried the one with the embedded font first and changed the font file names to match Kobo's required naming convention (*). On an Aura with 2.5.1, the segment at the end of chapter 10 showed happily using either Courier New or Dark Courier as embedded fonts. The copy I'm uploading has both embedded and Dark Courier selected. I also added a couple of bolded lines oin the boot sequence near the end of Chapter 10 just to play with the appearance.
For the copy using the <code>/</code>, Kobo does not supply a default monospaced font so this will not work. In my case, since I have a monospaced font in my sideloaded fonts, I used a reference to that font set which seems to work when I added the following to the stylesheet:
Code:
@font-face {
font-family: monospace;
font-weight: normal;
font-style: normal;
src: url('res:///fonts/normal/Dark Courier')
}
@font-face {
font-family: monospace;
font-weight: normal;
font-style: italic; src: url('res:///fonts/italic/Dark Courier')
}
@font-face {
font-family: monospace;
font-weight: bold; font-style:
normal; src: url('res:///fonts/bold/Dark Courier')
}
@font-face {
font-family: monospace;
font-weight: bold; font-style:
italic; src: url('res:///fonts/bolditalic/Dark Courier')
}
code {
font-family: "Dark Courier", monospace;
}
Unfortunately, that depends on having a monospaced font available which is not the case for the standard Kobo font set so the embedded font would be the better way to code your book.
Best I can do for now.
Regards,
David
(*) Kobo ereaders are very fussy about the font file naming. There have been several discussion on various threads. The best spot to look is the pinned "Summary of modified fonts" thread.