0
votes

I bought a theme from themeforest that uses font-awesome and simple-line-icons

When I opened the static html files using Chrome, it works perfectly.

I refactor the html so that it works with my php app, and I serve the php files using nginx and php-fpm.

The icons show up as squares in Chrome.

I look at the same url in Safari. The icons are okay.

I then opened up /etc/nginx/mime.types and added

font/ttf                      ttf;
font/opentype                 otf;
application/font-woff         woff;
application/vnd.ms-fontobject eot;

right at the bottom just before the curly brace }.

I also commented out the original eot value in the mime.types.

Restarted the nginx.

The same issue persists.

Also tried clearing browser caches. Same issue persists.

When I change to use cdn for the font-awesome, the font-awesome icons work perfectly.

Unfortunately there is no cdn for simple-line-icons.

In summary,

  • open static files using Chrome NOT using cdn == okay
  • open php files served by nginx using Safari without altering the mime.types NOT using cdn == okay
  • open php files served by nginx using Safari after altering the mime.types NOT using cdn == okay

  • open php files served by nginx using Chrome after using cdn == okay

  • open php files served by nginx using Chrome without altering the mime.types NOT using cdn == NOT okay

  • open php files served by nginx using Chrome after altering the mime.types NOT using cdn == NOT okay

I am using Chrome v40 on macbook pro. Nginx is on ubuntu 14.04 via a VM.

I am stumped. Please help.

1

1 Answers

0
votes

Try regenerating the font files using Font Squirrel webfont generator using TTF file you have and replace the existing one in the theme.