I was expecting to be able to use the Google Fonts version of Inter and use font-feature-settings, namely "salt" for stylistic alternatives, specifically single-story ‘a’ but found that nothing happened.
Here’s a reproducible example:
Are font-feature-settings not supported by Google Fonts?
I got curious and opened https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=block; it looks like Google Fonts is shipping the woff2 version, which may very well not support ligatures.
Is this what’s going on or am I missing something?
Thanks!
It looks like Google might serving a non variable version of the font, otherwise it would not serve different files for the different font weights.
Is this something that can be fixed? Would love access to all the font-feature-settings
Did you try any other font-feature-settings? I did, in the above pen, and it looks like NONE of the font-feature-settings is supported.
I also used the download link on the Google Fonts website, to see what is included. The set of files I received, looks somewhat like a "work in process": only TTF files (both static and variable), no WOFF or WOFF2; no italic static files.
At least for now I think it will be better to get the files from Github.
By the way: for the single-story "a" it may be better to use the setting "cv11" instead of "salt", because "salt" includes a few other changes that you may not like. see the Interactive Lab.
Did you try any other font-feature-settings? I did, in the above pen, and it looks like NONE of the font-feature-settings is supported.
This is my experience too, @HenkBarreveld. This seems like a limitation of Google Fonts, not Inter. I suppose we can close this issue?
I just went to Google Fonts and they now have a new checkbox to select variable fonts only. The first time you load the page it gives you a notification that "Google Font not supports Variable fonts". I downloaded Inter and the font files are not the same ones as before. I have not checked if they are variable or not.
@alexleduc: Strange. The first time I load the Google Fonts page I get a notification "Google Font now supports Variable fonts". Please note the essential, one character difference... Then, when you click the link "Download family", you get a zip-file with a folder "static" and an additional file "Inter-VariableFont_slnt,wght.ttf".
So, what do you think??
@codex-zaydek: For what it's worth, I found the following comment on Github from pelagic-sky in the varnish repo:
Webfonts served by Google Fonts are sub-setted (that means its optimized, and some glyphs are removed to make the file smaller so it loads faster).
To force Google to send you the entire full file (no subsetting) you have to specify "subsetting=all".
...
Once you are getting the full font, in your CSS you need to add this code to activate the lnum feature in all browsers:
font-feature-settings: "lnum"
(https://github.com/allenai/varnish/issues/192)
This is of course only valid if you use the fonts with hosting by Google and I did not test it.
@codex-zaydek: Update
I realized that I can test the "subsetting=all" in your pen. It does not work. I (finally :-)) also looked at the Google Fonts API documentation (https://developers.google.com/fonts) and could not find anything about support for OpenType features.
I think you are right; this is a Google Fonts issue, not an Inter issue, so it can be closed. The only thing is that the text on the Inter website "Using Inter is as easy as downloading & installing the font files. If you're making a web thing, you can use the following CSS or get it from Google Fonts." is somewhat misleading because Google Fonts does not offer you the same.
It looks like support for variable fonts was added very recently so the implementation might not be finished or simply buggy. We won't know for sure until Rasmus answers this thread, because it can also by him that made a mistake when he uploaded them (assuming he even had a hand in it... it's probably done by a Google employee)
Thanks all!
This is extremely informative. I suspect this was an intentional decision by Google to support the lowest common denominator of features so as to support as many users as possible. I could be wrong but that at least feels consistent with what Google Fonts is trying to achieve, even at the cost of sacrificing some flexibility.
I think it makes sense to leave this open for Rasmus or anyone else to follow-up in the future. If not, I can close this in a few weeks.
Thanks again!
You could try asking at https://github.com/google/fonts/issues
Google Fonts does their own custom builds from source.
Most helpful comment
@codex-zaydek: Update
I realized that I can test the "subsetting=all" in your pen. It does not work. I (finally :-)) also looked at the Google Fonts API documentation (https://developers.google.com/fonts) and could not find anything about support for OpenType features.
I think you are right; this is a Google Fonts issue, not an Inter issue, so it can be closed. The only thing is that the text on the Inter website "Using Inter is as easy as downloading & installing the font files. If you're making a web thing, you can use the following CSS or get it from Google Fonts." is somewhat misleading because Google Fonts does not offer you the same.