Skip to content

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

@sebastienbarre

Description

@sebastienbarre

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions