Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / text / sub-pixel / text-scaling-webfont.html
blob9a983cbe81effd9ceebc60471884576c04d820a6
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 <style>
7 @font-face {
8 font-family: 'Open Sans';
9 font-style: normal;
10 font-weight: 400;
11 src: url('../../../resources/opensans/OpenSans-Regular.woff') format('woff');
13 section > div > div {
14 font-family: 'Open Sans', 'Segoe UI';
16 </style>
17 <script src="resources/text-scaling.js"></script>
18 <script src="../../../resources/js-test.js"></script>
19 </head>
20 <body>
21 <section>
22 <h1>Font Size Scaling (WebFont, Latin)</h1>
23 <p>
24 Size of the text should scale smoothly.
25 Reported width should be within 0.02px of that of the highlighted reference row.
26 </p>
27 <div id="test"></div>
28 </section>
29 <script>
30 if (window.testRunner && window.testRunner.setTextSubpixelPositioning)
31 window.testRunner.setTextSubpixelPositioning(true);
33 var PANGRAM = 'My faxed joke won a pager in the cable TV quiz show.';
34 var results = runTest(document.getElementById('test'), PANGRAM);
36 if (results == PASS) {
37 testPassed('Size of text scales smoothly and width scales with font size as expected.');
39 // Hide text if test passes as the actual numbers are
40 // different across platforms and would require platform
41 // specific baselines.
42 if (window.testRunner)
43 document.getElementById('test').style.display = 'none';
44 } else {
45 testFailed('Size of text does not scale smoothly, reported widths highlighted in red do not match reference row.');
47 </script>
48 </body>
49 </html>