The Font Squirrel API

fontgrinder.png

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

Daniel Glazman

Works fine :-) See http://is.gd/i8Wfp
Best,

Daniel
December 3, 2010 at 09:41 AM
DADU

Is it possible to include the URL to the font preview so these can be used to load images and link back to Fontsquirrel?

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
brandonjp

thank you!!! :)
December 13, 2010 at 01:04 PM
Tom

Ahhh.. nice, many thanks!
January 21, 2011 at 03:40 PM
MS

I'm trying to use the API in a html/js page. But the data returns "undefined".
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
MS

I also try:
- using dataType:'JSON' returns error
- add &callback;=? or &jsoncallback;=? to the url returns parsererror
June 2, 2011 at 04:39 AM
Steve

To those having issues hitting the API using jQuery: you need to make it a jsonp request. Check their docs and look for "JSONP". I think you can just specify that as the "dataType".

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
Ryan Bradley

Works great. Thanks for making this available, love the fonts.
October 30, 2011 at 11:27 PM

Submit a Comment

Comments are closed.

Font Lists

Find Fonts

Font Filter

Languages

About Font Squirrel

Font Squirrel is your best resource for FREE, hand-picked, high-quality, commercial-use fonts. Even if that means we send you elsewhere to get them... more info

 

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.