View Single Post
Old 10-20-2023, 04:33 AM   #1
jugaor
Enthusiast
jugaor began at the beginning.
 
jugaor's Avatar
 
Posts: 33
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:
The font-family: monospace, monospace hack fixes the inheritance and scaling of font-size for preformatted text. The duplication of monospace is intentional.
So I have tried the above, changing:
Code:
code, kbd, samp, pre, .mono, .mono p {
  font-family: monospace;
}
to:
Code:
code, kbd, samp, pre, .mono, .mono p {
  font-family: monospace, monospace;
}
So far the "unifying" effect looks good in:

Aldiko
Click image for larger version

Name:	Aldiko_once.jpg
Views:	149
Size:	30.1 KB
ID:	204353Click image for larger version

Name:	Aldiko_twice.jpg
Views:	151
Size:	33.2 KB
ID:	204354

Lithium
Click image for larger version

Name:	Lithium_once.jpg
Views:	155
Size:	46.2 KB
ID:	204355Click image for larger version

Name:	Lithium_twice.jpg
Views:	131
Size:	51.8 KB
ID:	204356

PocketBook (Auto/Standard engine)
Click image for larger version

Name:	Pocketbook_once.jpg
Views:	144
Size:	29.8 KB
ID:	204357Click image for larger version

Name:	Pocketbook_twice.jpg
Views:	143
Size:	32.5 KB
ID:	204358

Reasily
Click image for larger version

Name:	Reasily_once.jpg
Views:	142
Size:	49.0 KB
ID:	204359Click image for larger version

Name:	Reasily_twice.jpg
Views:	139
Size:	52.9 KB
ID:	204360

Calibre viewer (Windows)
Click image for larger version

Name:	Calibre_once.jpg
Views:	145
Size:	35.5 KB
ID:	204361Click image for larger version

Name:	Calibre_twice.jpg
Views:	143
Size:	39.7 KB
ID:	204362

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!
jugaor is offline   Reply With Quote