Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a WOFF/WOFF2 version of the css #59

Open
wysman opened this issue Nov 22, 2019 · 10 comments
Open

Add a WOFF/WOFF2 version of the css #59

wysman opened this issue Nov 22, 2019 · 10 comments
Labels

Comments

@wysman
Copy link

wysman commented Nov 22, 2019

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
Copy link
Owner

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
Copy link
Owner

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

@Templarian Templarian reopened this Nov 22, 2019
@francoism90
Copy link

francoism90 commented Feb 10, 2020

@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
Copy link
Owner

@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.

  • Decide what CodePoint updates and impact would cause for people upgrading to v5
    • We've never officially supported use of codepoints, but never explicitly told people to not hard code them.

@Templarian
Copy link
Owner

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
Copy link
Owner

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
Copy link
Owner

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

@Templarian
Copy link
Owner

Templarian commented Feb 28, 2021

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
Copy link
Owner

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
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants