blob: 063db4b6026585cb9d843fd04d38e55aec193a2c [file] [log] [blame]
<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>
This test is meant <span id=selection>to test if font metrics change when partially rendered. To test select multiple lines with the begin</span> 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 selectionNode = document.getElementById("selection");
var range = document.createRange();
range.selectNode(selectionNode);
selection.addRange(range);
</script>
</body>
</html>