a client-side font analysis library
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
demo
dist
libs/qunit
src
test
LICENSE-MIT
README.md
grunt.js
mac-languages.json
package.json

README.md

fontificate.js

A client-side font library

Getting Started

Download the production version or the development version.

In your web page:

<script src="jquery.js"></script>
<script src="dist/fontificate.min.js"></script>
<script>
var file = ... // somehow obtain an html File
fontificate(file).then(function(thefont) {
    $('#samplediv').html(thefont.stringToSVG('hello, world'));
});
</script>

Demo

Check out the demo housed here

Documentation

(Coming soon)

Examples

(Coming soon)

Release History

(Nothing yet)

License

Copyright (c) 2012 Sam L'Ecuyer
Licensed under the MIT license.

FreeSans.ttf is not subject to my own licensing. It is subject to the GPL.

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using grunt.

Important notes

Please don't edit files in the dist subdirectory as they are generated via grunt. You'll find source code in the src subdirectory!

While grunt can try to run the included unit tests via PhantomJS, this shouldn't be considered a substitute for the real thing. Please be sure to test the test/*.html unit test file(s) in actual browsers. PhantomJS doesn't support all the APIs fontificate uses properly, so it really can't be used for testing. You can fire up a local server in the root directory using python -m SimpleHTTPServer 8000.

Installing grunt

This assumes you have node.js and npm installed already.

  1. Test that grunt is installed globally by running grunt --version at the command-line.
  2. If grunt isn't installed globally, run npm install -g grunt to install the latest version. You may need to run sudo npm install -g grunt.
  3. From the root directory of this project, run npm install to install the project's dependencies.