10-20-2023, 04:33 AM | #1 | |
Enthusiast
Posts: 30
Karma: 10
Join Date: Jun 2011
Location: Lima, Peru
Device: Kindle 10Gen / Kobo Aura HD / Nook STR
|
Monospace font sizes
Hello.
I have noticed that, in certain apps, texts in monospaced font appear smaller than the rest. I found this: https://github.com/necolas/normalize.css Quote:
Code:
code, kbd, samp, pre, .mono, .mono p { font-family: monospace; } Code:
code, kbd, samp, pre, .mono, .mono p { font-family: monospace, monospace; } Aldiko Lithium PocketBook (Auto/Standard engine) Reasily Calibre viewer (Windows) In apps that don't seem to need them (ADE, Google PlayBooks, Koodoo, Thorium, etc.) they don't affect them either. On the other hand, duplicating the definition of the other families (sans, serif) has no effect. They always look good (as seen in the screenshots). Has anyone else tried this? Could it cause any problems? Cheers! |
|
10-28-2023, 03:05 PM | #2 |
Resident Curmudgeon
Posts: 74,022
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Forget that normalize.css. It's rubbish for eBooks.
Just put in the code for monopsace and let it be. There's no way to make it work in every program that displays ePub. For example, a lot of Android programs, you'll find they don't work well. You cannot code for every program. You code for what's correct and if the program someone is using doesn't work, it's not your fault. |
11-16-2023, 01:27 AM | #3 |
Enthusiast
Posts: 30
Karma: 10
Join Date: Jun 2011
Location: Lima, Peru
Device: Kindle 10Gen / Kobo Aura HD / Nook STR
|
JSWolf, thanks for your reply.
I agree with you that huge 'reset' or 'normalize' blocks are generally unnecessary, but this little hack seems to be useful to prevent monospaced texts from looking tiny. In any case, I only place it when code or another monospace class is actually used in the epub. BTW, I have continued testing and with the Big Three they look like this: Apple iBooks (v15) Kindle (azw3 /Calibre) Kobo (kepub /kepubify) (as we know, Kobo doesn't yet have a monospaced font... but it does resize just like other engines. Epub —read by ADE— has no differences.) I leave it here in case anyone else finds it useful. Thanks for your attention! |
11-16-2023, 11:58 AM | #4 | |
Evangelist
Posts: 417
Karma: 6913952
Join Date: Aug 2013
Location: Hamden, CT
Device: Kindle Paperwhite (11th gen), Scribe
|
Quote:
https://fonts.google.com/?classification=Monospace lists 40 font families, all free to use in eBooks, even if you are selling the books. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Changing the size of the monospace font? | pickyaxe | KOReader | 7 | 07-12-2021 10:16 PM |
lack of monospace / fixed width font | lumpynose | Kobo Reader | 12 | 08-26-2019 11:55 PM |
Smaller monospace font? | Action Superhero | Kindle Formats | 1 | 03-30-2016 11:27 AM |
HTML to ePUB with monospace font | il_mix | Conversion | 12 | 06-28-2013 10:07 AM |
* to Mobi: setting monospace font size | Starko | Conversion | 7 | 11-16-2012 03:04 PM |