2 <html lang=
"en" dir=
"ltr">
7 border:
1px dashed #AAA;
8 background-color: #E0E0E0;
28 This page let you test the rendering font-family declaration for monospaced fonts. TODO: add some references here :-)
31 Erwin Dokter had the following explanation on
<a href=
"https://bugzilla.wikimedia.org/33496">Bugzilla #
33496</a>:
34 By default, a (Windows) browser has it's default font-sizes set at
16px for
35 serif and sans-serif, and
13px for monospace. Except in IE, where you cannot
36 set any font-sizes... it uses
16px for all fonts.
38 Vector has a base font-size of
0.8em, and most browsers *correctly* scale down
39 all fonts, including the monospace font, accordingly. So monospace is shown at
40 0.8 x
13px =
10px (which is perceived as 'too small'). But when you assign any
41 font besides just
"monospace", those browsers will no longer treat it as
42 monospace and use
0.8 x
16px =
13px instead.
45 Additionally, it seems that textareas have their own font-size set in Chrome
46 (but not Firefox and other browsers), making them unaffected by this behavior.
49 Below are various rendering:
56 <th><textarea
></th>
62 font-family: monospace;'
>
63 font-family: monospace;
68 font-family: monospace;'
>
69 font-family: monospace;
77 font-family:
"Courier New";'
>
78 font-family:
"Courier New";
83 font-family:
"Courier New";'
>
84 font-family:
"Courier New";
92 font-family: Courier;'
>
98 font-family: Courier;'
>
107 font-family: monospace, monospace;'
>
108 font-family: monospace, monospace;
113 font-family: monospace, monospace;'
>
114 font-family: monospace, monospace;
122 font-family: monospace,
"Courier New";'
>
123 font-family: monospace,
"Courier New";
128 font-family: monospace,
"Courier New";'
>
129 font-family: monospace,
"Courier New";
137 font-family: monospace, Courier;'
>
138 font-family: monospace, Courier;
143 font-family: monospace, Courier;'
>
144 font-family: monospace, Courier;
152 font-family: monospace, Verdana;'
>
153 font-family: monospace, Verdana;
158 font-family: monospace, Verdana;'
>
159 font-family: monospace, Verdana;
167 font-family: monospace, DOESNOTEXISTREALLY;'
>
168 font-family: monospace, DOESNOTEXISTREALLY;
173 font-family: monospace, DOESNOTEXISTREALLY;'
>
174 font-family: monospace, DOESNOTEXISTREALLY;