Web Font is downloaded even when all the characters in the document are outside its...
[WebKit-https.git] / LayoutTests / fast / text / unicode-range-download.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script>
5 if (window.testRunner) {
6     testRunner.dumpResourceLoadCallbacks();
7     testRunner.dumpAsText();
8 }
9 if (window.internals) {
10         internals.invalidateFontCache();
11 }
12 </script>
13 <style>
14 @font-face {
15         font-family: WebFont;
16         src: url("../../resources/Ahem.ttf") format("truetype");
17         unicode-range: U+42;
18 }
19 @font-face {
20         font-family: WebFont;
21         src: url("../../resources/Ahem.otf") format("opentype");
22         unicode-range: U+41;
23 }
24 </style>
25 </head>
26 <body>
27 This test makes sure that fonts with unicode-ranges which are never applicable are not downloaded.
28 Note that, currently, we always download the first font, regardless of unicode-range. We use this font's metrics for things like baseline location.
29 This test passes iff 2 or fewer fonts are downloaded.
30 <div style="font: 100px WebFont">A</div>
31 </body>
32 </html>