layout/reftests/font-face/name-collision-bad-url.html

Fri, 16 Jan 2015 18:13:44 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 16 Jan 2015 18:13:44 +0100
branch
TOR_BUG_9701
changeset 14
925c144e1f1f
permissions
-rw-r--r--

Integrate suggestion from review to improve consistency with existing code.

michael@0 1 <!DOCTYPE HTML>
michael@0 2 <html>
michael@0 3 <head>
michael@0 4 <title>Font name collision test</title>
michael@0 5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
michael@0 6
michael@0 7 <!--
michael@0 8 Font family names in @font-face rules take precedence over locally-available font families,
michael@0 9 so none of the names of commonly used platform fonts should match against locally available
michael@0 10 fonts.
michael@0 11 -->
michael@0 12
michael@0 13 <style type="text/css">
michael@0 14
michael@0 15 @font-face {
michael@0 16 font-family: fallback;
michael@0 17 src: url(../fonts/mplus/mplus-1p-regular.ttf);
michael@0 18 }
michael@0 19
michael@0 20 body {
michael@0 21 margin: 50px;
michael@0 22 font-family: fallback;
michael@0 23 }
michael@0 24
michael@0 25 table {
michael@0 26 margin-left: 3em;
michael@0 27 }
michael@0 28
michael@0 29 @font-face {
michael@0 30 font-family: Sample;
michael@0 31 src: url(../fonts/bogus-dir/bogus-font.ttf);
michael@0 32 font-weight: 900;
michael@0 33 }
michael@0 34
michael@0 35 .sample { font-family: Sample, fallback; }
michael@0 36
michael@0 37 /* Windows */
michael@0 38
michael@0 39 @font-face {
michael@0 40 font-family: Arial;
michael@0 41 src: url(../fonts/bogus-dir/bogus-font.ttf);
michael@0 42 font-weight: 900;
michael@0 43 }
michael@0 44
michael@0 45 .arial { font-family: Arial, fallback; }
michael@0 46
michael@0 47 @font-face {
michael@0 48 font-family: Times New Roman;
michael@0 49 src: url(../fonts/bogus-dir/bogus-font.ttf);
michael@0 50 font-weight: 900;
michael@0 51 }
michael@0 52
michael@0 53 .timesnewroman { font-family: Times New Roman, fallback; }
michael@0 54
michael@0 55 @font-face {
michael@0 56 font-family: Courier New;
michael@0 57 src: url(../fonts/bogus-dir/bogus-font.ttf);
michael@0 58 font-weight: 900;
michael@0 59 }
michael@0 60
michael@0 61 .couriernew { font-family: Courier New, fallback; }
michael@0 62
michael@0 63 /* Mac OS X */
michael@0 64
michael@0 65 @font-face {
michael@0 66 font-family: Futura;
michael@0 67 src: url(../fonts/bogus-dir/bogus-font.ttf);
michael@0 68 font-weight: 900;
michael@0 69 }
michael@0 70
michael@0 71 .futura { font-family: Futura, fallback; }
michael@0 72
michael@0 73 @font-face {
michael@0 74 font-family: Helvetica;
michael@0 75 src: url(../fonts/bogus-dir/bogus-font.ttf);
michael@0 76 font-weight: 900;
michael@0 77 }
michael@0 78
michael@0 79 .helvetica { font-family: Helvetica, fallback; }
michael@0 80
michael@0 81 @font-face {
michael@0 82 font-family: Times;
michael@0 83 src: url(../fonts/bogus-dir/bogus-font.ttf);
michael@0 84 font-weight: 900;
michael@0 85 }
michael@0 86
michael@0 87 .times { font-family: Times, fallback; }
michael@0 88
michael@0 89 @font-face {
michael@0 90 font-family: Courier;
michael@0 91 src: url(../fonts/bogus-dir/bogus-font.ttf);
michael@0 92 font-weight: 900;
michael@0 93 }
michael@0 94
michael@0 95 .courier { font-family: Courier, fallback; }
michael@0 96
michael@0 97 /* Linux */
michael@0 98
michael@0 99 @font-face {
michael@0 100 font-family: Bitstream Vera Sans;
michael@0 101 src: url(../fonts/bogus-dir/bogus-font.ttf);
michael@0 102 font-weight: 900;
michael@0 103 }
michael@0 104
michael@0 105 .bitstreamverasans { font-family: Bitstream Vera Sans, fallback; }
michael@0 106
michael@0 107 @font-face {
michael@0 108 font-family: DejaVu Sans;
michael@0 109 src: url(../fonts/bogus-dir/bogus-font.ttf);
michael@0 110 font-weight: 900;
michael@0 111 }
michael@0 112
michael@0 113 .dejavusans { font-family: DejaVu Sans, fallback; }
michael@0 114
michael@0 115 @font-face {
michael@0 116 font-family: FreeSans;
michael@0 117 src: url(../fonts/bogus-dir/bogus-font.ttf);
michael@0 118 font-weight: 900;
michael@0 119 }
michael@0 120
michael@0 121 .freesans { font-family: FreeSans, fallback; }
michael@0 122
michael@0 123 table {
michael@0 124 font-family: Sample;
michael@0 125 }
michael@0 126
michael@0 127 table td {
michael@0 128 font-size: 24pt;
michael@0 129 }
michael@0 130
michael@0 131 </style>
michael@0 132
michael@0 133 </head>
michael@0 134
michael@0 135 <body>
michael@0 136
michael@0 137 <p>All text below should appear in the same "fallback" font face:</p>
michael@0 138
michael@0 139 <table>
michael@0 140 <tr class="sample"><td>Sample</td></tr>
michael@0 141 <tr class="arial"><td>Arial</td></tr>
michael@0 142 <tr class="timesnewroman"><td>Times New Roman</td></tr>
michael@0 143 <tr class="couriernew"><td>Courier New</td></tr>
michael@0 144 <tr class="futura"><td>Futura</td></tr>
michael@0 145 <tr class="helvetica"><td>Helvetica</td></tr>
michael@0 146 <tr class="times"><td>Times</td></tr>
michael@0 147 <tr class="courier"><td>Courier</td></tr>
michael@0 148 <tr class="bitstreamverasans"><td>Bitstream Vera Sans</td></tr>
michael@0 149 <tr class="dejavusans"><td>DejaVu Sans</td></tr>
michael@0 150 <tr class="freesans"><td>FreeSans</td></tr>
michael@0 151 </table>
michael@0 152
michael@0 153 </body>
michael@0 154 </html>

mercurial