gabriel / font-detect-js
- Source
- Commits
- Network (0)
- Issues (0)
- Downloads (0)
- Wiki (1)
- Graphs
-
Tree:
64bc075
commit 64bc075e3f720704f88b24be7ba8bb26a8d2d67d
tree ceff6b540efbb67ec610caa1e83bd2f5c0363aa9
parent 512a3a78f71dec95bd21ce9cdf88fa3dcc2b8035
tree ceff6b540efbb67ec610caa1e83bd2f5c0363aa9
parent 512a3a78f71dec95bd21ce9cdf88fa3dcc2b8035
| name | age | message | |
|---|---|---|---|
| |
README.md | ||
| |
amp.html | ||
| |
edit.html | ||
| |
flash/ | ||
| |
index.html | ||
| |
index.prototype.html | ||
| |
javascripts/ | ||
| |
stylesheets/ | Thu Jun 26 14:23:49 -0700 2008 |
README.md
This code uses flash to detect system fonts and then detects via javascript in the browser which fonts will actually render.
View a demo at: http://font-detect.s3.amazonaws.com/index.html

<!-- element for SWF to load into -->
<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() {
var fontDetect = newFontDetect("font-detect-swf", "flash/FontList.swf", function(fd) {
var fonts = fd.fonts();
// Do something with fonts, which look like: [ { fontName:'Arial', fontStyle:'regular' fontType:'device' }, .... ]
// for(var i = 0, length = fonts.length; i < length; i++) {
// var name = fonts[i].fontName;
// }
};
});
</script>
There is also a Prototype version at font-detect.prototype.js

