The Font Squirrel API
Back in June 2010, we silently introduced an API that allows you to get at all our fonts that are @font-face ready. In all cases the data that is returned is in JSON format, which you can easily integrate server or browser-side.
You are free to implement the following:
1) Classifications. Get a list of the various categories with a count of how many families are in that category.
http://www.fontsquirrel.com/api/classifications
2) Families. Get a list of families. You can specify ‘all’, or a classification name {name} to get only those.
http://www.fontsquirrel.com/api/fontlist/all
http://www.fontsquirrel.com/api/fontlist/{name}
3) Family details. This will output information about each font in the family, including family name, style name, glyph count, filename, font-face family name plus a few more.
http://www.fontsquirrel.com/api/familyinfo/{family_urlname}
4) Kit download.
Download a font-face kit with TTF/WOFF/SVG/EOT formats in the western language (MacRoman) subset.
http://www.fontsquirrel.com/fontfacekit/{family_urlname}
Let me know if you find this useful or need additional data.
Comments
For example, if a foundry has some fontfamilies on Fontsquirrel and wants to showcase their work on their website via the Fontsquirrel API, how would that be possible?
Thanks,
DADU
December 5, 2010 at 07:54 PM
The code:
$.ajax({
url: 'http://www.fontsquirrel.com/api/fontlist/all',
dataType: "script",
error: function (jqXHR, textStatus, errorThrown) {
console.log(jqXHR);
console.log(textStatus);
console.log(errorThrown);
},
success: function (data, textStatus, jqXHR) {
console.log(data);
console.log(textStatus);
console.log(jqXHR);
}
});
Please help me!!!
June 1, 2011 at 01:52 PM
- using dataType:'JSON' returns error
- add &callback;=? or &jsoncallback;=? to the url returns parsererror
June 2, 2011 at 04:39 AM
To Fontsquirrel: This is really cool. It would be even better if the font kits' css files had the fonts embedded inline as url("data:font/woff;charset=utf-8;base64,[font data..]"). That would be excellent. See http://documentcloud.github.com/jammit/#embedding for more information.
Cheers!
June 23, 2011 at 06:26 PM
October 30, 2011 at 11:27 PM
Submit a Comment
Comments are closed.
Font Squirrel relies on advertising in order to keep
bringing you great new free fonts and to keep making improvements to the web font generator.
If you are seeing this message, you probably have an ad blocker turned on. Please consider
disabling it to see content from our partners.
Alternatively, you can support Font
Squirrel by purchasing a paid license from our sister site,
Fontspring.
Best,
Daniel
December 3, 2010 at 09:41 AM