OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE> |
| 2 <html> |
| 3 <head> |
| 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| 5 <link rel="stylesheet" type="text/css" href="resources/text-scaling.css
"> |
| 6 <script src="resources/text-scaling.js"></script> |
| 7 <script src="../../../resources/js-test.js"></script> |
| 8 </head> |
| 9 <body> |
| 10 <section> |
| 11 <h1>Font Size Scaling (LTR, Latin)</h1> |
| 12 <p> |
| 13 Size of the text should scale smoothly. |
| 14 Reported width should be within 0.01px of that of the highlighte
d reference row. |
| 15 </p> |
| 16 <div id="test"></div> |
| 17 </section> |
| 18 <script> |
| 19 if (window.testRunner && window.testRunner.setTextSubpixelPositionin
g) |
| 20 window.testRunner.setTextSubpixelPositioning(true); |
| 21 |
| 22 var PANGRAM = 'Pack my box with five dozen liquor jugs.'; |
| 23 var results = runTest(document.getElementById('test'), PANGRAM); |
| 24 |
| 25 if (results == PASS) { |
| 26 testPassed('Size of text scales smoothly and width scales with f
ont size as expected.'); |
| 27 |
| 28 // Hide text if test passes as the actual numbers are |
| 29 // different across platforms and would require platform |
| 30 // specific baselines. |
| 31 if (window.testRunner) |
| 32 document.getElementById('test').style.display = 'none'; |
| 33 } else { |
| 34 testFailed('Size of text does not scale smoothly, reported width
s highlighted in red do not match reference row.'); |
| 35 } |
| 36 </script> |
| 37 </body> |
| 38 </html> |
OLD | NEW |