Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <html> | |
| 3 <head> | |
| 4 <meta http-equiv="Content-Type" content="text/html;charset=utf-8"> | |
| 5 <title>Letter spacing and Ligature</title> | |
| 6 | |
| 7 <style type="text/css"> | |
| 8 @font-face { | |
| 9 font-family: megalopolis; | |
| 10 src: url(../../third_party/MEgalopolis/MEgalopolisExtra.woff) format("woff"); | |
| 11 } | |
| 12 | |
| 13 .dligDiv { | |
| 14 -moz-font-feature-settings:"frac" 1, "dlig" 1; | |
| 15 -moz-font-feature-settings:"frac=1, dlig=1"; | |
| 16 -ms-font-feature-settings:"frac" 1, "dlig" 1; | |
| 17 -o-font-feature-settings:"frac" 1, "dlig" 1; | |
| 18 -webkit-font-feature-settings:"frac" 1, "dlig" 1; | |
| 19 font-feature-settings:"frac" 1, "dlig" 1; | |
| 20 } | |
| 21 | |
| 22 .common { | |
| 23 font-size: 24px; | |
| 24 line-height: 100%; | |
| 25 padding: 0px; | |
| 26 letter-spacing:20px; | |
| 27 font-family: megalopolis; | |
| 28 } | |
| 29 | |
| 30 p { font-family: serif; font-style: italic; } | |
| 31 </style> | |
| 32 | |
| 33 <script src="../../resources/testharness.js"></script> | |
| 34 <script src="../../resources/testharnessreport.js"></script> | |
| 35 <script> | |
| 36 setup({ explicit_done: true }); | |
| 37 function testLetterSpaceAndLigature() { | |
| 38 var elementWidthWithLigatureAndLetterSpacing = document.getElementsByCla ssName("dligSpan")[0].getBoundingClientRect().width; | |
| 39 var elementWidthWithLetterSpacing = document.getElementsByClassName("let terSpace")[0].getBoundingClientRect().width; | |
| 40 test(function() { | |
| 41 assert_equals(elementWidthWithLigatureAndLetterSpacing, elementWidth WithLetterSpacing, "Ligature not applied due to letter spacing."); | |
| 42 }, "Ligature expected not to be applied due to letter spacing."); | |
| 43 done(); | |
| 44 } | |
| 45 </script> | |
| 46 </head> | |
| 47 <body onload="testLetterSpaceAndLigature();"> | |
| 48 <div class="dligDiv common"> | |
| 49 <span class="dligSpan">CACACACA</span> | |
| 50 </div> | |
| 51 | |
| 52 <div class="common"> | |
| 53 <span class="letterSpace">CACACACA</span> | |
| 54 </div> | |
| 55 | |
| 56 <div id="log"></div> | |
|
Inactive
2014/06/09 13:39:45
This is actually optional. testharness.js will cre
h.joshi
2014/06/09 13:51:59
Done.
| |
| 57 </body> | |
| 58 </html> | |
| OLD | NEW |