Skip to content

louisremi/font-detect-js

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

font-detect-js

Uses javascript (jQuery or Prototype) + flash to detect your system fonts.

View a demo

font-detect.png

<!-- 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 = new FontDetect("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

About

Font detection using Javascript and Flash

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 76.4%
  • CSS 13.5%
  • ActionScript 8.1%
  • Ruby 2.0%