34 lines
872 B
HTML
34 lines
872 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<script>
|
|
if (window.testRunner) {
|
|
testRunner.dumpResourceLoadCallbacks();
|
|
testRunner.dumpAsText();
|
|
}
|
|
if (window.internals) {
|
|
internals.clearMemoryCache();
|
|
internals.invalidateFontCache();
|
|
}
|
|
</script>
|
|
<style>
|
|
@font-face {
|
|
font-family: WebFont;
|
|
src: url("../../resources/Ahem.ttf") format("truetype");
|
|
unicode-range: U+42;
|
|
}
|
|
@font-face {
|
|
font-family: WebFont;
|
|
src: url("../../resources/Ahem.otf") format("opentype");
|
|
unicode-range: U+41;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
This test makes sure that fonts with unicode-ranges which are never applicable are not downloaded.
|
|
Note that, currently, we always download the first font, regardless of unicode-range. We use this font's metrics for things like baseline location.
|
|
This test passes iff 2 or fewer fonts are downloaded.
|
|
<div style="font: 100px WebFont">A</div>
|
|
</body>
|
|
</html>
|