2 <html lang=
"en" dir=
"ltr" xmlns=
"http://www.w3.org/1999/xhtml">
4 <style type=
"text/css">
6 border: 1px dashed
#AAA;
7 background-color: #E0E0E0;
19 This page let you test the rendering font-family declaration for monospaced fonts. TODO: add some references here :-)
22 Erwin Dokter had the following explanation on
<a href=
"https://bugzilla.wikimedia.org/33496">Bugzilla #
33496</a>:
25 By default, a (Windows) browser has it's default font-sizes set at
16px for
26 serif and sans-serif, and
13px for monospace. Except in IE, where you cannot
27 set any font-sizes... it uses
16px for all fonts.
29 Vector has a base font-size of
0.8em, and most browsers *correctly* scale down
30 all fonts, including the monospace font, accordingly. So monospace is shown at
31 0.8 x
13px =
10px (which is perceived as 'too small'). But when you assign any
32 font besides just
"monospace", those browsers will no longer treat it as
33 monospace and use
0.8 x
16px =
13px instead.
36 Below are various rendering:
40 font-family: monospace;'
>
41 font-family: monospace;
45 font-family:
"Courier New";'
>
46 font-family:
"Courier New";
50 font-family: Courier;'
>
55 font-family: monospace, monospace;'
>
56 font-family: monospace, monospace;
60 font-family: monospace,
"Courier New";'
>
61 font-family: monospace,
"Courier New";
65 font-family: monospace, Courier;'
>
66 font-family: monospace, Courier;
70 font-family: monospace, Verdana;'
>
71 font-family: monospace, Verdana;
75 font-family: monospace, DOESNOTEXISTREALLY;'
>
76 font-family: monospace, DOESNOTEXISTREALLY;