[email protected] | 0189984 | 2011-08-10 19:24:26 | [diff] [blame] | 1 | <head> |
| 2 | <style> |
| 3 | @font-face { |
| 4 | /* FeatureTest.ttf is a small font for testing OpenType features. |
| 5 | * It contains: |
| 6 | * - The black box glyph which is associated with 'W', 'e', 'b', 'K', 'i' and 't'. |
| 7 | * - A discretionary ligature glyph of 'WebKit'. |
| 8 | */ |
| 9 | font-family: 'test'; |
| 10 | src: url(resources/FeatureTest.ttf); |
| 11 | } |
| 12 | .dligOn { |
| 13 | font-family: 'test'; |
| 14 | -webkit-font-feature-settings: 'dlig'; |
| 15 | } |
| 16 | .dligOff { |
| 17 | font-family: 'test'; |
| 18 | -webkit-font-feature-settings: 'dlig' 0; |
| 19 | } |
| 20 | .dligNone { |
| 21 | font-family: 'test'; |
| 22 | } |
| 23 | </style> |
| 24 | <script> |
[email protected] | 8801062 | 2012-06-11 18:23:57 | [diff] [blame] | 25 | if (window.testRunner) |
Xianzhu Wang | af4fa41 | 2018-05-14 21:26:52 | [diff] [blame] | 26 | testRunner.waitUntilDone(); |
[email protected] | 0189984 | 2011-08-10 19:24:26 | [diff] [blame] | 27 | |
| 28 | function test() { |
| 29 | document.body.offsetTop; |
[email protected] | 8801062 | 2012-06-11 18:23:57 | [diff] [blame] | 30 | if (window.testRunner) |
| 31 | testRunner.notifyDone(); |
[email protected] | 0189984 | 2011-08-10 19:24:26 | [diff] [blame] | 32 | } |
| 33 | </script> |
| 34 | </head> |
| 35 | <body onload="setTimeout(test, 300)"> |
| 36 | <p>Test for font-feature-settings property. The first word of the following three words should be displayed like "WebKit", while others should be displayed as black boxes.</p> |
| 37 | <div class="dligOn">WebKit</div> |
| 38 | <div class="dligOff">WebKit</div> |
| 39 | <div class="dligNone">WebKit</div> |
| 40 | </body> |