OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <meta charset="utf-8"> | 4 <meta charset="utf-8"> |
5 <style type="text/css"> | 5 <style type="text/css"> |
6 @font-face { | 6 @font-face { |
7 font-family: libertinerangesplit; | 7 font-family: libertinerangesplit; |
8 src: url("../../third_party/Libertine/LinLibertine_R.woff"); | 8 src: url("../../third_party/Libertine/LinLibertine_R.woff"); |
9 unicode-range: U+0066, U+0069; | 9 unicode-range: U+0066, U+0069; |
10 } | 10 } |
11 | 11 |
12 @font-face { | 12 @font-face { |
13 font-family: libertinefull; | 13 font-family: libertinefull; |
14 src: url("../../third_party/Libertine/LinLibertine_R.woff"); | 14 src: url("../../third_party/Libertine/LinLibertine_R.woff"); |
15 } | 15 } |
16 | 16 |
17 .test { | 17 .test { |
18 font-size: 200px; | 18 font-size: 200px; |
19 } | 19 } |
20 | 20 |
21 #libertinerangesplit { | 21 #libertinerangesplit { |
22 font-family: libertinerangesplit; | 22 font-family: libertinerangesplit; |
| 23 visibility: hidden; |
23 } | 24 } |
24 | 25 |
25 #libertinefull { | 26 #libertinefull { |
26 font-family: libertinefull; | 27 font-family: libertinefull; |
| 28 visibility: hidden; |
27 } | 29 } |
28 </style> | 30 </style> |
29 | 31 |
30 <script src="../../resources/testharness.js"></script> | 32 <script src="../../resources/testharness.js"></script> |
31 <script src="../../resources/testharnessreport.js"></script> | 33 <script src="../../resources/testharnessreport.js"></script> |
32 | 34 |
33 <script type="text/javascript"> | 35 <script type="text/javascript"> |
34 | 36 |
35 async_test(function(testHandle) { | 37 async_test(function(testHandle) { |
36 document.fonts.ready.then( function() { | 38 document.fonts.ready.then( function() { |
37 testHandle.step( function() { | 39 testHandle.step( function() { |
38 rangesplitwidth = document.querySelector("#libertinerangesplit").get
BoundingClientRect().width; | 40 rangesplitwidth = document.querySelector("#libertinerangesplit").get
BoundingClientRect().width; |
39 fullwidth = document.querySelector("#libertinefull").getBoundingClie
ntRect().width; | 41 fullwidth = document.querySelector("#libertinefull").getBoundingClie
ntRect().width; |
40 assert_equals(rangesplitwidth, fullwidth); | 42 assert_equals(rangesplitwidth, fullwidth); |
41 }); | 43 }); |
42 testHandle.done(); | 44 testHandle.done(); |
43 }); | 45 }); |
44 }, "Ligature for fi formed for full font and subsetted font."); | 46 }, "Ligature for fi formed for full font and subsetted font."); |
45 | 47 |
46 </script> | 48 </script> |
47 </head> | 49 </head> |
48 <body> | 50 <body> |
49 <div class="test"> | 51 <div class="test"> |
50 <span id="libertinerangesplit">fi</span> | 52 <span id="libertinerangesplit">fi</span> |
51 <span id="libertinefull">fi</span> | 53 <span id="libertinefull">fi</span> |
52 </div> | 54 </div> |
53 </body> | 55 </body> |
OLD | NEW |