railslove / fontello_rails_converter

CLI gem for comfortably working with icon fonts (open, download, convert) from http://fontello.com for usage in Rails apps.
MIT License
73 stars 35 forks source link

WOFF2 Support #40

Closed chriszamierowski closed 8 years ago

chriszamierowski commented 8 years ago

It looks like Fontello now supports WOFF2, so running fontello convert results in a .scss file that looks something like:

@font-face {
  font-family: 'fontname';
  src: font-url('fontname.eot?36722241');
  src: font-url('fontname.eot?36722241#iefix') format('embedded-opentype'),
       font-url('fontname.woff2?36722241') format('woff2'),
       font-url('fontname.woff?36722241') format('woff'),
       font-url('fontname.ttf?36722241') format('truetype'),
       font-url('fontname.svg?36722241#fontname') format('svg');
  font-weight: normal;
  font-style: normal;
}

The issue is the actual .woff2 font file isn't downloading with it. I've got a (very simple) fix here, but I'm not sure how to provide test coverage for this (or if it even needs it).

If somebody can walk me through that I'd be happy to submit a PR

jhilden commented 8 years ago

thanks for reporting this. I would say definitely make a PR for this and we will see if there are any failing tests or if additional tests should be written. But it looks simple enough to me.