OLD | NEW |
1 <html> | 1 <!DOCTYPE html> |
2 » <body> | 2 This tests platform specific system font styles. If any of the styles appear in
monospace the test fails. |
3 » » <h1>CSS2 System Fonts</h1> | 3 <hr> |
4 » » <p>The following should appear with the fonts specified, per the
<a href="http://www.w3.org/TR/REC-CSS2/fonts.html#propdef-font">CSS2 specs</a>.
If they appear in a monospace font, the test has failed.</p> | 4 <div style="font-family: monospace;" id="container"></div> |
5 » » <ul style="font-family: monospace;"> | 5 <script> |
6 » » » <li style="font: caption;">Caption (on Mac will be Lucid
a Grande 13.0 Regular)</li> | 6 var systemFontStyles = [ |
7 » » » <li style="font: icon;">Icon (on Mac will be Lucida Gran
de 13.0 Regular for now, not sure how to get this info from Finder) | 7 'caption', |
8 » » » <li style="font: menu;">Menu (on Mac will be Lucida Gran
de 13.0 Regular)</li> | 8 'icon', |
9 » » » <li style="font: message-box;">Message-Box (on Mac will
be Lucida Grande 13.0 Regular)</li> | 9 'menu', |
10 » » » <li style="font: small-caption;">Small-Caption (on Mac w
ill be Lucida Grande 11.0 Regular)</li> | 10 'message-box', |
11 » » » <li style="font: status-bar;">Status-Bar (on Mac will be
Lucida Grande 10.0 Regular)</li> | 11 'small-caption', |
12 » » </ul> | 12 'status-bar', |
13 » » <p><a href="./">« Return to Safari Bugs page</a></p> | 13 ]; |
14 » </body> | 14 systemFontStyles.forEach(function(systemFont) { |
15 </html> | 15 var item = document.createElement('div'); |
| 16 container.appendChild(item); |
| 17 item.style.font = systemFont; |
| 18 item.textContent = systemFont + ': ' + getComputedStyle(item).font; |
| 19 }); |
| 20 if (window.testRunner) { |
| 21 testRunner.dumpAsText(); |
| 22 } |
| 23 </script> |
OLD | NEW |