Haven't some issues with the cross-browsers with the icon replacement fonts on Firefox, currently only show-up the content text but not the icomoon text replacement. Source code shown from code Sass + Magento + .htaccess, any idea or help would be much appreciated.
Website: http://www.phoebessecret.co.nz
Had done .htaccess rewrite:
AddType image/svg+xml svg svgz
AddEncoding gzip svgz
AddType application/vnd.ms-fontobject eot
AddType font/truetype ttf
AddType font/opentype otf
AddType application/x-font-woff woff
<FilesMatch ".(ttf|otf|eot|woff)$">
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
Header set Access-Control-Allow-Origin "http://www.phoebessecret.co.nz"
Header set Access-Control-Allow-Origin "http://skin.phoebessecret.co.nz"
Header set Access-Control-Allow-Origin "http://js.phoebessecret.co.nz"
Header set Access-Control-Allow-Origin "http://media.phoebessecret.co.nz"
</IfModule>
</FilesMatch>
CSS:
@font-face {
font-family: 'topshops';
src:url('../fonts/topshops.eot');
src:url('../fonts/topshops.eot?#iefix') format('embedded-opentype'),
url('../fonts/topshops.svg#topshops') format('svg'),
url('../fonts/topshops.woff') format('woff'),
url('../fonts/topshops.ttf') format('truetype');
font-weight: normal;
font-style: normal;}
.icon-fonts {
font-family: 'topshops';
font-style: normal;
speak: none;
-webkit-font-smoothing: antialiased;
font-smoothing: antialiased;
text-rendering: optimizeLegibility;
font-weight: 400;
}
.iconsearch {
content: "\61";
}
Open the IcoMoon App. Select the icons you want in your set by clicking on them. You can select icons from paid or free libraries by clicking the Icon Library button in the top toolbar. If you have your own icons, you can upload them by clicking Import icons in the top toolbar.
IcoMoon. IcoMoon offers both free or premium fonts. The free ones are open source, and the premium fonts are paid. IcoMoon also has a web app that makes it possible for you to generate your own font by choosing only the icons that you want.
IcoMoon is an icon solution, providing three main services: vector icon packs, the IcoMoon App, and hosting icons as SVGs or fonts.
Try to add this to your .htaccess file. It should fix your issue. It fixed mine.
<FilesMatch ".(ttf|otf|eot|woff)$">
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
</FilesMatch>
I was having issues with icomoon and Firefox as well. Have you tried Paul Irish's 'bulletproof' @font-face
syntax? It's a little different than what icomoon outputs and I've had better luck with it - no FF issues since.
@font-face {
font-family: 'Graublau Web';
src: url('GraublauWeb.eot?') format('eot'), url('GraublauWeb.woff') format('woff'), url('GraublauWeb.ttf') format('truetype');
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With