A client-side font library
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>
Check out the demo housed here
(Coming soon)
(Coming soon)
(Nothing yet)
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.
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.
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
.
This assumes you have node.js and npm installed already.
- Test that grunt is installed globally by running
grunt --version
at the command-line. - If grunt isn't installed globally, run
npm install -g grunt
to install the latest version. You may need to runsudo npm install -g grunt
. - From the root directory of this project, run
npm install
to install the project's dependencies.