summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/css/font-face-unicode-range-ligatures.html
blob: 34619c467bd751fdcd1d39d3f4c19f0f44b1882f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style type="text/css">
    @font-face {
    font-family: libertinerangesplit;
    src: url("../../third_party/Libertine/LinLibertine_R.woff");
    unicode-range: U+0066, U+0069;
    }

    @font-face {
    font-family: libertinefull;
    src: url("../../third_party/Libertine/LinLibertine_R.woff");
    }

    .test {
    font-size: 200px;
    }

    #libertinerangesplit {
    font-family: libertinerangesplit;
    }

    #libertinefull {
    font-family: libertinefull;
    }
</style>

<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>

<script type="text/javascript">

async_test(function(testHandle) {
    document.fonts.ready.then( function() {
        testHandle.step( function() {
            rangesplitwidth = document.querySelector("#libertinerangesplit").getBoundingClientRect().width;
            fullwidth = document.querySelector("#libertinefull").getBoundingClientRect().width;
            assert_equals(rangesplitwidth, fullwidth);
        });
        testHandle.done();
    });
}, "Ligature for fi formed for full font and subsetted font.");

</script>
</head>
<body>
    <div class="test">
        <span id="libertinerangesplit">fi</span>
        <span id="libertinefull">fi</span>
    </div>
</body>