30 lines
906 B
HTML
30 lines
906 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<script src="../../resources/js-test-pre.js"></script>
|
|
<script>
|
|
if (window.internals) {
|
|
internals.invalidateFontCache();
|
|
internals.clearMemoryCache();
|
|
}
|
|
</script>
|
|
<style>
|
|
@font-face {
|
|
font-family: "WebFont";
|
|
src: url("../../resources/Ahem.otf") format("opentype");
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div><span id="target" style="font: 100px 'WebFont';">Hello</span></div>
|
|
<div><span id="ref" style="font: 100px 'Times';">Hello</span></div>
|
|
<script>
|
|
description("This test makes sure that the advances of the interstitial (invisible) font used during font loading is not very far from 'Times'. This is necessary for web compatibility.");
|
|
var target = document.getElementById("target");
|
|
var ref = document.getElementById("ref");
|
|
shouldBeCloseTo("target.offsetWidth", ref.offsetWidth, 5);
|
|
</script>
|
|
<script src="../../resources/js-test-post.js"></script>
|
|
</body>
|
|
</html>
|