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

Option not to Base64 WOFF/TTF font files? #300

Closed
sebastienbarre opened this issue Feb 3, 2015 · 3 comments
Closed

Option not to Base64 WOFF/TTF font files? #300

sebastienbarre opened this issue Feb 3, 2015 · 3 comments
Labels
customization: css Design CSS customizability

Comments

@sebastienbarre
Copy link

Hi
The small scaffolding.less imports mdfi.css

@import (less)"material-design-fonticons/mdfi.css";

This mdfi.css file is almost 2,300 lines and a 436 KB big because it holds Base64 versions of mdfonticon.ttf and mdfonticon.woff.

@font-face {
  font-family: 'mdfonticon';
  src: url('fonts/mdfonticon.eot');
}
@font-face {
  font-family: 'mdfonticon';
  src: url(data:application/x-font-ttf;charset=utf-8;base64,...
       url(data:application/font-woff;charset=utf-8;base64,...
  font-weight: normal;
  font-style: normal;
}

Unfortunately, this prevents packers/bundlers/optimizers like webpack from handling it (be it by using Base64, or moving it to a separate CSS files, etc).

Would it be possible to revert back to links to the font files, or to provide an alternate CSS file? I would not mind creating my own scaffolding.less that would point to a mdfi-nobase64.css file.

Thanks

@hai-cea
Copy link
Member

hai-cea commented Feb 3, 2015

Hi @sebastienbarre - yes, font files are going away completely. See #125

@sebastienbarre
Copy link
Author

Sorry, I missed these. Thanks for the feedback and keep up the good work.

@hai-cea
Copy link
Member

hai-cea commented Feb 3, 2015

Thanks @sebastienbarre :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customization: css Design CSS customizability
Projects
None yet
Development

No branches or pull requests

4 participants