12-23-2014, 09:31 AM | #1 |
Resident Curmudgeon
Posts: 74,015
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Font families not working
I have code that is supposed to display text in monospace.
Code:
.monospace { font-family: monospace } .para-wlf { margin-top: 1em; text-indent: 1em; margin-left: 0; margin-right: 0; margin-bottom: 0; } Code:
<p class="para-wlf monospace">This is the paragraph.</p> |
12-23-2014, 10:41 AM | #2 |
frumious Bandersnatch
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
I don't think so, but I haven't tried. This was already noticed in the ePub Reader Test:
Default Fonts: Default font is customizable, but standard families do not change. "cursive" and "fantasy" look like "serif", "monospace" looks like the custom default. |
Advert | |
|
12-23-2014, 10:45 AM | #3 |
Guru
Posts: 769
Karma: 6528026
Join Date: Sep 2012
Device: Kobo Elipsa
|
I don't believe Kobo provides a default monospace font. The solution is discussed here (see post #8): https://www.mobileread.com/forums/sho...kobo_extra.css
|
12-23-2014, 11:41 AM | #4 | |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
Code:
<p class="para-wlf"><span class="monospace">This is the paragraph.</span></p> Code:
body, p {font-family: -ua-default !important;} Code:
body {font-family: -ua-default !important;} Last edited by jackie_w; 12-23-2014 at 11:43 AM. |
|
12-23-2014, 01:37 PM | #5 | |
Resident Curmudgeon
Posts: 74,015
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
Advert | |
|
12-23-2014, 01:49 PM | #6 | |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
Code:
<Patch> patch_name = `Un-force font-family override p tags (std epubs)` patch_enable = `yes` replace_bytes = C99A64, 2C 00 20 00 70 00, 20 00 20 00 20 00 </Patch> |
|
12-23-2014, 03:37 PM | #7 | |
Resident Curmudgeon
Posts: 74,015
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
a div in place of a p did not work. |
|
12-23-2014, 03:49 PM | #8 |
Resident Curmudgeon
Posts: 74,015
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Monospace did not work for some reason. It should have though. ADE for Windows does support monospace as a font name. My T1 and 650 also work with monospace. It's Kobo that is not working.
|
12-23-2014, 04:22 PM | #9 |
Resident Curmudgeon
Posts: 74,015
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
The book I am trying to fix is The Martian by Andy Weir. The problem is that the embedded fonts are some sort of free serif, freemono, and freesans. They are way too light for eInk and I did replace the main font and that worked fine. The sans-serif font is tolerable but the default sans-serif font is better. The mono font is lousy. It's very light. When using an external light source, I can read it. But using the front light, it's barely readable. Dark Courier is so much better.
I tried monospace with a div and that did not work. I tried the patch that jackie_w posted and that did not work. I'm beginning to think there is no monospace font. |
12-23-2014, 04:47 PM | #10 |
Fanatic
Posts: 598
Karma: 641742
Join Date: Mar 2012
Location: DE
Device: Kobo Glo
|
In the past Kobo readers had an embedded monospace font on board which was linked to generic font family monopace.
At some point (don't know from which firmware version, i guess 2.x.x) Kobo made a poor decision to link a dyslectic font to the generic font family monospace. And removed the embedded monospace font completely. Personally, i think that using a dyslectic font for the generic font family monospace is the wrong way to implement this. It would have been wiser to link a dyslectic font to the generic font families cursive or fantasy. Those two generic font families are currently not used by Kobo at all. And those two generic font families aren't widely used by publishers. IMO, a good reader needs a proper serif, sans serif and a monospace font. |
12-23-2014, 04:58 PM | #11 | |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
- sideload a monospace font (like Dark Courier) and - do the kobo_extra.css trick from the post #3 link and - at least one of the other 3 options (<div>, <span> or my special Patch). The kobo_extra.css will then add the monospace @font-faces to every epub you subsequently send-to-device with calibre. Most epubs won't need or use it but those that contain instances of font-family:monospace should use it correctly. |
|
12-23-2014, 05:20 PM | #12 | |
Resident Curmudgeon
Posts: 74,015
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
12-23-2014, 05:30 PM | #13 | |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
Just to be clear, is the Patch option working for you now? ETA: I never use Document Default. If I want Charis (or anything else) I prefer to select it from the menu. Also coding font-family:serif always seems to give you Georgia on Kobos so it's best to remove all occurrences if this would be unwelcome. Last edited by jackie_w; 12-23-2014 at 06:05 PM. |
|
12-23-2014, 06:45 PM | #14 | |
Resident Curmudgeon
Posts: 74,015
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
12-23-2014, 07:01 PM | #15 |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
You can do this if you want, but why is it necessary? I've never needed to embed any fonts (monospace, small-caps, fancy initials etc.) to access them.
Last edited by jackie_w; 12-23-2014 at 07:03 PM. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Fonts and font families | troll05 | General Discussions | 3 | 05-06-2013 07:53 PM |
Font-families and justified alignment | ElMiko | Sigil | 46 | 03-04-2013 02:27 AM |
More on working around the font-size issue | billingd | Kobo Reader | 13 | 06-25-2010 08:49 PM |
Multiple Font Families in one Ebook (K2) | delphidb96 | Amazon Kindle | 1 | 12-13-2009 11:11 PM |
505 vs. different font families in LRF | pepak | Sony Reader | 8 | 09-29-2009 01:03 PM |