List Opentype features from loaded webfonts

Hi all

I'm not sure this is possible but I thought I'd ask anyway.

Is there a way programatically to list the opentype features in a webfont without opening it.

I know I can open the font is something like Fontlab and see the Opentype features or Open it in a type setting program like Indesign and see which features are available but is there a way to get this from the font without opening it in another program.

I'm developing a website that will show Opentype features and it would be good If I could capture the opentype features in the font without having to open them.



  • python -> fonttools
  • If you're doing this as a website, you may want to look into which is a Javascript library that'll parse OpenType fonts for you. It has support for OT features, although it's not that well documented and you will need to dig around in the code to find it. Check out the Font Inspector example as a place to start.
  • There is a proposal to expose OpenType features (including variable axes) through CSS or JavaScript, but it's just a draft and won't be coming to browsers anytime soon, I don't think. (But do leave a +1 there if you want to let browser developers know we want this!)

    I made something similar to what you're doing. It's called Wakamai Fondue and I'm using Fontkit to analyse fonts and deduct OpenType features from them. The reason I'm using Fontkit over opentype.js is that it supports WOFF2 too. In either case, you'll need to include a hefty JavaScript and write code to list features yourself.

    The code to Wakamai Fondue isn't open source but not a super secret either, if you need any help shoot me a message!
  • If your list of fonts is a known I'd recommend to do the parsing server-side beforehand, and also cache the results, or even do it dynamically with a server round trip rather than a Javascript parser. Extracting this information for every user in their browser might solve the problem, but depending on the information shown it might not be a very efficient way.
Sign In or Register to comment.