| <html> |
| <head> |
| <style> |
| @font-face { |
| font-family: PTSans; |
| src: url('resources/PTS55F-webfont.ttf') format("truetype"); |
| font-weight: normal; |
| font-style: normal; |
| } |
| #sandbox { position: absolute; width: 400px; } |
| article { |
| width: 400px; |
| font-family: PTSans; |
| font-size: 24px; |
| -webkit-font-kerning: normal; |
| } |
| </style> |
| </head> |
| <body> |
| <div id=sandbox> |
| <article id=article>This test is meant to test if font metrics change when partially rendered. To test select multiple lines with the begin or end line being only partially selected. The test succedes if none of the letters in the partially selected lines shift compared to when they are not selected or the line fully selected.</article> |
| </div> |
| <script> |
| var selection = window.getSelection(); |
| if (selection.rangeCount > 0) |
| selection.removeAllRanges(); |
| var article = document.getElementById("article"); |
| var range = document.createRange(); |
| range.setStart(article.firstChild, 19); |
| range.setEnd(article.firstChild, 119); |
| selection.addRange(range); |
| </script> |
| |
| </body> |
| </html> |