-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathamp.html
61 lines (48 loc) · 2.08 KB
/
amp.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
<html>
<head>
<title>Font Detect</title>
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.5.2/build/reset/reset-min.css">
<link rel="stylesheet" type="text/css" href="stylesheets/font-detect.css" />
<link rel="stylesheet" type="text/css" media="print" href="stylesheets/font-detect-print.css" />
</head>
<body>
<div id="content">
<div class="noprint">
<p id="status"><span>Checking Flash version...</span> — <a href="edit.html">Edit</a></p>
</div>
</div>
<div id="font-detect-swf"></div>
<script src="javascripts/jquery-1.2.6.pack.js"></script>
<script src="javascripts/swfobject.js"></script>
<script src="javascripts/font-detect.js"></script>
<script>
$(document).ready(function() {
// Check Flash version
if (!swfobject.hasFlashPlayerVersion("9.0.0"))
$("#status span").html("You don't have a compatible version of Flash installed?");
else
$("#status span").html("Loading... (this may beach ball your browser for ~10 seconds)")
var fontDetect = new FontDetect("font-detect-swf", "flash/FontList.swf", function(fd) {
var fonts = fd.fonts();
$("#status span").html("Loaded " + fonts.length + " fonts");
var text = "&";
var size = "32px";
for(var i = 0; i < fonts.length; i++) {
var divNode = document.createElement("div");
var node = document.createElement("p");
$(node).css("font-family", "'" + fonts[i].fontName + "'");
$(node).css("font-size", size);
$(node).addClass("sample-text");
$(node).html(text);
$(divNode).append(node);
var nameNode = document.createElement("p");
$(nameNode).addClass("sample-text-name");
$(nameNode).html("[" + fonts[i].fontName + "]");
$(divNode).append(nameNode);
$("#content").append(divNode);
}
});
});
</script>
</body>
</html>