ember-cli: Getting corrupted font assets in ember-cli 2.4.0

After upgrading to 2.4.0 I started getting font errors in chrome and FF console:

Failed to decode downloaded font: http://localhost:4200/assets/themes/default/assets/fonts/icons.woff2

OTS parsing error: incorrect entrySelector for table directory

which turn into broken icons. I use semantic-ui, so those come from that library (via semantic-ui-ember addon)

A difference I spotted between 2.3 and 2.4 is in the console output of the ember server command:

2.3 prints

...
SourceMapConcat: Concat: Vendor               | 394ms
...

whereas 2.4 prints

...
SourceMapConcat: Concat: Vendor /assets/ve... | 289ms
...

I checked the file sizes of the fonts and there is difference between the source and the destination:

$ ls -lah bower_components/semantic-ui/dist/themes/default/assets/fonts/
total 716K
drwxr-xr-x 2 pablo users 4.0K Jan  8 06:45 .
drwxr-xr-x 4 pablo users 4.0K Mar  1 10:13 ..
-rw-r--r-- 1 pablo users  60K Jan  8 06:45 icons.eot
-rw-r--r-- 1 pablo users  92K Jan  8 06:45 icons.otf
-rw-r--r-- 1 pablo users 307K Jan  8 06:45 icons.svg
-rw-r--r-- 1 pablo users 120K Jan  8 06:45 icons.ttf
-rw-r--r-- 1 pablo users  70K Jan  8 06:45 icons.woff
-rw-r--r-- 1 pablo users  56K Jan  8 06:45 icons.woff2

$ ls -lah dist/assets/themes/default/assets/fonts/
total 996K
drwxr-xr-x 2 pablo users 4.0K Mar  1 10:15 .
drwxr-xr-x 4 pablo users 4.0K Mar  1 10:15 ..
-rw-r--r-- 1 pablo users 109K Mar  1 10:24 icons.eot
-rw-r--r-- 1 pablo users 175K Mar  1 10:24 icons.otf
-rw-r--r-- 1 pablo users 307K Mar  1 10:24 icons.svg
-rw-r--r-- 1 pablo users 154K Mar  1 10:24 icons.ttf
-rw-r--r-- 1 pablo users 130K Mar  1 10:24 icons.woff
-rw-r--r-- 1 pablo users 103K Mar  1 10:24 icons.woff2

You can see there is difference in the total size of 280K (bigger in dist) for some reason

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 24 (12 by maintainers)

Commits related to this issue

Most upvoted comments

@milosb793 This is unrelated to Ember CLI and this issue. Font Awesome is the library which has versions 4.5.0 and 4.7.0. If only one of them is working you should address it at ember-font-awesome, not here. Also, please open new issues instead of adding on to old issues. It helps keep old threads less confusing when being referenced by people who discover them via Google.

Best of luck!