I've recently started using Ubuntu. I installed Chrome from the installer provided on Google's website.
When I started working on my sites, I noticed the icons didn't show. They work fine on Windows and on Firefox (both Windows and Ubuntu).
I used Fontastic to generate the webfonts from SVG files. On Windows I used WAMP and they worked fine. Now I'm using XAMPP. This probably has nothing to do since they don't work on remote servers either. I get no errors or warnings on the console, they simply don't show.
This is an example. I have this @font-face
:
@charset "UTF-8";
@font-face {
font-family: "site-icons";
src:url("../webfonts/site-icons.eot");
src:url("../webfonts/site-icons.eot?#iefix") format("embedded-opentype"),
url("../webfonts/site-icons.woff") format("woff"),
url("../webfonts/site-icons.ttf") format("truetype"),
url("../webfonts/site-icons.svg#site-icons") format("svg");
font-weight: normal;
font-style: normal;
}
This is the code provided by Fontastic. When I check Chrome's network tab in developer tools, I see this response:
HTTP/1.1 200 OK
Date: Mon, 08 Jun 2015 15:54:08 GMT
Server: Apache/2.4.12 (Unix) OpenSSL/1.0.1m PHP/5.5.24 mod_perl/2.0.8-dev Perl/v5.16.3
Last-Modified: Sun, 15 Jun 2014 02:14:32 GMT
ETag: "adc-4fbd6789d7200"
Accept-Ranges: bytes
Content-Length: 2780
Keep-Alive: timeout=5, max=95
Connection: Keep-Alive
And if i go to the preview tab, I see the fonts just fine!
So why don't they show on the site? This happens ONLY in Chrome/Ubuntu.
The weird part is that if I go to Font Awesome, I see the icons, they work fine: http://fortawesome.github.io/Font-Awesome/
This is their code
/*!
* Font Awesome 4.3.0 by @davegandy - http://fontawesome.io - @fontawesome
* License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
*/
/* FONT PATH
* -------------------------- */
@font-face {
font-family: 'FontAwesome';
src: url('../fonts/fontawesome-webfont.eot?v=4.3.0');
src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.3.0') format('embedded-opentype'), url('../fonts/fontawesome-webfont.woff2?v=4.3.0') format('woff2'), url('../fonts/fontawesome-webfont.woff?v=4.3.0') format('woff'), url('../fonts/fontawesome-webfont.ttf?v=4.3.0') format('truetype'), url('../fonts/fontawesome-webfont.svg?v=4.3.0#fontawesomeregular') format('svg');
font-weight: normal;
font-style: normal;
}
Well I'll be damned. It was AdBlock. AdBlock usually displays a little badge showing how many elements are being blocked on each page. It didn't show anything!
I hadn't noticed these styles being inserted until now:
I assume they come from AdBlock. I've used the classes
.icon
and.icon-facebook
,.icon-twitter
, etc. And the selectors also match anya
withtitle="Facebook"
ortitle="Follow us on Facebook"
Disabling AdBlock solved the problem.
Keep in mind that this is only on Chrome on Ubuntu (or any Linux distro, most likely).
I changed the classes, removed the title attributes and they still don't show. And even worse now, there's no visible reason as to why! No warnings (ie:
net::ERR_BLOCKED_BY_CLIENT
), no "X elements blocked on page", no nothing. So I guess I'll be contacting AdBlock about this.