Templarian / MaterialDesign-Webfont

@mdi/font Dist for Material Design Icons.
https://materialdesignicons.com
Other
402 stars 157 forks source link

Add a WOFF/WOFF2 version of the css #59

Open wysman opened 4 years ago

wysman commented 4 years ago

Hi,

The TTF and EOT version of the font are huge and not really need with modern browsers / mobile platform. Can you add a alternate version of your css without it ? It's will reduce bundle size of lot of people.

Cheers,

Templarian commented 4 years ago

Unfortunately those are used by third party packages for mobile/design related tools. We recently removed SVG a few versions back cutting the package size by half, but removing TTF would break other tooling outside of "web".

We highly recommend moving to @mdi/svg or @mdi/js if the webfont size becomes an issue.

Splitting up the packages would add maintenance. In your CI/Build I would just ignore those files if they are not used.

Templarian commented 4 years ago

Actually leaving this opened this might be a good 5.0 thing.

francoism90 commented 4 years ago

@wysman + others - I have created a fork with only the WOFF 2.0 format and SCSS: https://github.com/francoism90/typeface-mdi/

All credits to @Templarian because I have only stripped out some stuff and only need to sync when a new version has been released. :)

Templarian commented 4 years ago

@francoism90 Can you hold off on forking. Our team is looking into a nicer solution for Desktop/Webfont post IE11 support.

For maintainability/security reasons this distribution should be handled on our side.

Templarian commented 4 years ago

Context for the above: https://twitter.com/MaterialIcons/status/1226986734849798144

It's looking more like for 5.0 we may only ship with Woff2 support as the font is extremely heavy for IE11 as it is with all the CSS.

Templarian commented 4 years ago

This did not make the 5.0 release. Forgot to go back and update this issue. There was too much uncertainty with the third party communities usage. We need to do a further dive into who is consuming this package and in what environments.

Templarian commented 3 years ago

We will be updating our default build in 6.0+ to not include the legacy font files.

Templarian commented 3 years ago

Ideally we will only have Woff2 in 6.0+. https://caniuse.com/woff2

For anyone that runs across this issues after it's closed out there is still a desktop font. Woff2 is only for the web and is a different font name.

https://github.com/Templarian/MaterialDesign-Font/

Templarian commented 3 years ago

Update: In our 7.0 planning Woff2 will become our only supported webfont format. With the wall of changes in 6.x it did not seem like a good timing.

Obviously we don't recommend using the webfont because that 7k glyphs is heavy even in woff2.

Templarian commented 2 years ago

So we ran into some issues with the latest version of webfont package. This causes very slow rendering of the font files after upgrading. We are sticking with this older version now, but can remove all the other font files in the 8.0 release.