05-05-2013, 11:45 AM | #1 |
Addict
Posts: 314
Karma: 1002965
Join Date: Mar 2006
Location: UK
Device: ILiad. Gen 3, PocketBook 360, Kobo Aura HD, Kindle Oasis 2
|
Monospaced fonts ignored in Kobo Aura
I have a science fiction book in which there are a lot of paragraphs in "machine code" for which I used a monospaced font "Courier New".
This font was in Sigil's Font Folder and also declared in the CSS stylesheet. The Kobo Aura ignores this font and displays these paragraphs in the same font as the rest of the book. I then removed all references to the "Courier New" font and nested these paragraphs in <code></code> but the font displayed is still the same as all the other paragraphs in the book. I'm stumped. Edit: I tried the book on my Kindle Keyboard and it works correctly. Last edited by Moonraker; 05-05-2013 at 11:54 AM. |
05-05-2013, 11:53 AM | #2 | |
Bibliophagist
Posts: 35,307
Karma: 145435140
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
Regards, David |
|
Advert | |
|
05-05-2013, 11:59 AM | #3 | |
Resident Curmudgeon
Posts: 73,894
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
font-family: monospace in the appropriate CSS class. |
|
05-05-2013, 12:16 PM | #4 |
Addict
Posts: 314
Karma: 1002965
Join Date: Mar 2006
Location: UK
Device: ILiad. Gen 3, PocketBook 360, Kobo Aura HD, Kindle Oasis 2
|
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 |
05-05-2013, 12:40 PM | #5 |
Trying for calm & polite
Posts: 4,012
Karma: 9455193
Join Date: May 2010
Location: Mostly in Canada
Device: kobo original, WiFI, Touch, Glo, and Aura
|
I am assuming you did try "Document Default" as a font choice when you did this, right?
|
Advert | |
|
05-05-2013, 01:04 PM | #6 | |
Addict
Posts: 314
Karma: 1002965
Join Date: Mar 2006
Location: UK
Device: ILiad. Gen 3, PocketBook 360, Kobo Aura HD, Kindle Oasis 2
|
Quote:
|
|
05-05-2013, 01:43 PM | #7 | |
Bibliophagist
Posts: 35,307
Karma: 145435140
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
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; } 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. Last edited by DNSB; 05-05-2013 at 02:16 PM. |
|
05-05-2013, 02:17 PM | #8 | |
Addict
Posts: 314
Karma: 1002965
Join Date: Mar 2006
Location: UK
Device: ILiad. Gen 3, PocketBook 360, Kobo Aura HD, Kindle Oasis 2
|
Quote:
Thank you David. I put the book that you amended in my Kobo and it works! I will have to be more careful with the naming of my fonts. I just assumed because it worked in my Kindle it should work with the Kobo. I have copied and pasted your answer into my "AllMyNotes Organizer" that I keep for scraps of code and other information. I shall digest it fully after I've had my dinner. Thank you very much for your help and here's some karma for you. |
|
05-05-2013, 02:29 PM | #9 | |
Bibliophagist
Posts: 35,307
Karma: 145435140
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
Regards, David |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Aura HD Kobo Aura HD | samhy | Kobo Reader | 13 | 01-02-2014 03:38 PM |
Aura HD Kobo Aura HD | PeterT | Kobo Reader | 937 | 07-29-2013 06:02 PM |
Kobo Kobo Aura HD | hamlok | Andere Lesegeräte | 89 | 05-24-2013 07:35 AM |
Kobo Aura Apps? | jedipencil | Kobo Reader | 7 | 04-30-2013 01:05 PM |
BD - how to get "monospaced" fonts? | HarryT | Sony Reader | 9 | 04-21-2007 09:46 AM |