google / material-design-icons

Material Design icons by Google (Material Symbols)
http://google.github.io/material-design-icons/
Apache License 2.0
50.57k stars 9.58k forks source link

WOFF & WOFF2 versions of the Material Symbol Variable Fonts #1326

Closed curtvict closed 1 year ago

curtvict commented 2 years ago

Hey there!

Is there a technical reason why the variable Material Symbol fonts aren't provided in woff & woff2 format in this repo? I noticed that they're here, but in ttf format only.

The reason I ask is because I'm trying to get them added to fontsource, who require both a woff and woff2 versions of their fonts.

I noticed that a woff2 version is being hosted on the static CDN. Is the woff version hiding on here too?

curtvict commented 2 years ago

@tphinney I'm going to try another run at including these fonts to @fontsource this week. Would we be able to get these fonts uploaded to this repo this week? It seems like a trivial add, to me, but I could be missing something.

tphinney commented 2 years ago

Even the TTF versions you link to are pretty old in our dev terms. The fonts served from fonts.google.com are updated roughly weekly, as I understand it. But these are all a bit downstream from the initial variable fonts I build. :/

I know this seems like a small ask, but at the moment we aren’t updating the TTFs either!

Assigning @EsoFromTheEast who might be able to comment more, as he posts the TTFs, and likely would be the one to post any derivative files from Google, including WOFF or WOFF2.

It might also be possible to get WOFF or WOFF2 versions from the fonts.google.com CDN, but I don’t know the details. (It wasn’t easily done the last time I checked, but that was many years back.)

curtvict commented 2 years ago

Thanks for the response @tphinney. I'm curious if @EsoFromTheEast has any ideas :)

ayuhito commented 2 years ago

It might also be possible to get WOFF or WOFF2 versions from the fonts.google.com CDN, but I don’t know the details. (It wasn’t easily done the last time I checked, but that was many years back.)

I'll have to test in a couple days since I'm not sure the same behaviour applies to icons, but I'm pretty sure it'll serve you the right files depending on your user-agent. If anyone wants to try in the meantime, this might be a useful reference.

curtvict commented 2 years ago

@ayuhito oh heck yeah, that works. Switching my user agent to Mozilla/4.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1667.0 Safari/537.36 and hitting https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200 produces

image

tphinney commented 1 year ago

Closing this as it has a reasonable workaround.