-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest-ie.html
79 lines (64 loc) · 1.93 KB
/
test-ie.html
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<!DOCTYPE html>
<html>
<head>
<title></title>
<style>
#mrpoo {
font-size: 18em;
font-family: VariablePooDemo Capheight01;
}
</style>
<script>
var fontList = [
'"VariablePooDemo Capheight01"',
'"VariablePooDemo Capheight02"',
'"VariablePooDemo Capheight03"',
'"VariablePooDemo Capheight04"',
'"VariablePooDemo Capheight05"',
'"VariablePooDemo Capheight06"',
'"VariablePooDemo Capheight07"',
'"VariablePooDemo Capheight08"',
'"VariablePooDemo Capheight09"'
];
var frameDuration = 60;
var curFont;
var el;
function nextFont(c) {
if ((c.val == 0) && (c.inc < 0)) {
c.inc = +1;
}
if ((c.val == fontList.length-1) && (c.inc > 0)) {
c.inc = -1;
}
c.val += c.inc;
return(c);
}
function start(elemId) {
el = document.getElementById(elemId)
// Start at the first font, progressing up
curFont = { val: 0, inc: +1};
// Start the first frame
update();
}
function update() {
// Replace the font with the current one in fontList
el.style.fontFamily = fontList[curFont.val];
// Increment font
curFont = nextFont(curFont);
// Set the timer for the next frame
var animationId = setTimeout(update, frameDuration);
}
function startAnimations() {
setTimeout(function() {
start("mrpoo");
}, 10000);
}
</script>
</head>
<body onload="startAnimations()">
<div id="mrpoo" class="common">
💩
</div>
<small>Remember to download <a href="./VariablePooDemo.ttf"></a> and install the font locally on Windows 10!</small>
</body>
</html>