custom fonts stopped working
ashishpandey
Registered Users Posts: 100 Big grins
I have been using fontawesome via css @font-face or quite some time on my smugmug page to render a nice menu. This is the same as described here. However, i recently noticed it had stopped working. The reason seems like smugmug is stripping off the src tags from the @font-face CSS block
My site is here: http://photography.ashishpandey.com/
the CSS block I am adding looks like this:
What I get after publishing the site is this:
clearly, the src attribute is missing and hence the font doesn't work
This worked fine until very recently, so no idea what is wrong now. Can someone please help?
My site is here: http://photography.ashishpandey.com/
the CSS block I am adding looks like this:
@font-face { font-family: 'FontAwesomeCdn'; src: url('https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/fonts/fontawesome-webfont.eot?v=4.6.3'); src: url('https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/fonts/fontawesome-webfont.eot?#iefix&v=4.6.3') format('embedded-opentype'), url('https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/fonts/fontawesome-webfont.woff2?v=4.6.3') format('woff2'), url('https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/fonts/fontawesome-webfont.woff?v=4.6.3') format('woff'), url('https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/fonts/fontawesome-webfont.ttf?v=4.6.3') format('truetype'), url('https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/fonts/fontawesome-webfont.svg?v=4.6.3#fontawesomeregular') format('svg'); font-weight: 400; font-style: normal; }
What I get after publishing the site is this:
@font-face{font-family:'FontAwesomeCdn';font-weight:400;font-style:normal}
clearly, the src attribute is missing and hence the font doesn't work
This worked fine until very recently, so no idea what is wrong now. Can someone please help?
Ashish
http://photography.ashishpandey.com
smugmug ID: ashishpandey (but I prefer my domain URL above )
http://photography.ashishpandey.com
smugmug ID: ashishpandey (but I prefer my domain URL above )
0
Comments
tailoredportraits.com
Images in the Backcountry
My SmugMug Customizations | Adding CSS to Your Site | SEO for the Photographer | Locate Your Page/Widget Number | SmugMug Help Desk
I put the URLs in my css block into the browser, and they do download a corresponding webfont file. I am not sure if I am missing something in the syntax or something else has gone wrong. Can someone take my CSS snippet and try it out to confirm it works on their smugmug account?
I have also generated the following links directly from fontawesome CDN which works in my test, but ends up with stripped src attributes on smugmug
http://photography.ashishpandey.com
smugmug ID: ashishpandey (but I prefer my domain URL above )
I used your @font-face and added it to my theme's CSS. Then I added a HTML/CSS block on my testing site and it worked fine. <img src="https://us.v-cdn.net/6029383/emoji/ne_nau.gif" border="0" alt="" >
HTML:
[html]
div id="social-media-buttons" class="buttons">
<ul id="social-media-buttons-items" class="buttons-items">
<li><a href="https://www.facebook.com/ImagesInTheBackcountry"><span class="screen-reader-text">Facebook</span></a></li>
<li><a href="http://www.flickr.com/people/imagesinthebackcountry"><span class="screen-reader-text">flicr</span></a></li>
<li><a href="https://plus.google.com/116009632176436768157"><span class="screen-reader-text">Google+</span></a></li>
<li><a href="http://twitter.com/HikinMike"><span class="screen-reader-text">Twitter</span></a></li>
<li><a href="http://www.pinterest.com/mikematenkosky/"><span class="screen-reader-text">Pinterest</span></a></li>
<li><a href="http://www.imagesinthebackcountry.com/feed/"><span class="screen-reader-text">Feed</span></a></li>
</ul>
</div>
[/html]
CSS:
Images in the Backcountry
My SmugMug Customizations | Adding CSS to Your Site | SEO for the Photographer | Locate Your Page/Widget Number | SmugMug Help Desk
Images in the Backcountry
My SmugMug Customizations | Adding CSS to Your Site | SEO for the Photographer | Locate Your Page/Widget Number | SmugMug Help Desk
SmugMug needs to fix this.
Images in the Backcountry
My SmugMug Customizations | Adding CSS to Your Site | SEO for the Photographer | Locate Your Page/Widget Number | SmugMug Help Desk
"You miss 100% of the shots you don't take" - Wayne Gretzky
Thanks for moving it.
I spent most of the afternoon (I was bored) trying to "make it work". I gave up figuring it was a recent bug.
Images in the Backcountry
My SmugMug Customizations | Adding CSS to Your Site | SEO for the Photographer | Locate Your Page/Widget Number | SmugMug Help Desk
You can still add fonts using Google fonts and this works for 'FontAwesome':
But any non-Google fonts uploaded by a different site or even using DropBox does not work.
Images in the Backcountry
My SmugMug Customizations | Adding CSS to Your Site | SEO for the Photographer | Locate Your Page/Widget Number | SmugMug Help Desk
Thanks for confirming. I also did some further tests, and it does look like smugmug is doing something selective with font URL's. I can use the exact same font-face on a non-smugmug website and it works fine. see example: http://apandeys.weebly.com/
The fact that the font-face declaration shows differently in the published website from what is in my customization is good enough indication that smugmug is changing something here
I will reach out to support and see what they say
http://photography.ashishpandey.com
smugmug ID: ashishpandey (but I prefer my domain URL above )
Also worth a note that any google fonts served via fonts.gstatic.com do not seem to work as well. As an example, Google Material Icons don't work if I use this CSS
http://photography.ashishpandey.com
smugmug ID: ashishpandey (but I prefer my domain URL above )
SmugMug offers 'Lora' but not the italic version, so add this to my site-wide theme's CSS and it works. I checked yesterday and there is a difference between the generic 'italic' and the font's version.
Images in the Backcountry
My SmugMug Customizations | Adding CSS to Your Site | SEO for the Photographer | Locate Your Page/Widget Number | SmugMug Help Desk
Former SmugMug Product Team
aaron AT aaronmphotography DOT com
Website: http://www.aaronmphotography.com
My SmugMug CSS Customizations website: http://www.aaronmphotography.com/Customizations
http://www.photom.me/Blog/Importing-Fonts-to-SmugMug
Glad it's working for you. I actually tried your example and it worked.
Still can't see the example fonts (FontAwesome and Karate) I set up on my test page.
Images in the Backcountry
My SmugMug Customizations | Adding CSS to Your Site | SEO for the Photographer | Locate Your Page/Widget Number | SmugMug Help Desk
Since there is a way to achieve this, I have no more complaints
Thanks to both Mike and Tom (and separately to both, if Tom from support is different from tomnovy above)
http://photography.ashishpandey.com
smugmug ID: ashishpandey (but I prefer my domain URL above )
I am glad I could help! Tom from support and tomnovy - same person :}
Images in the Backcountry
My SmugMug Customizations | Adding CSS to Your Site | SEO for the Photographer | Locate Your Page/Widget Number | SmugMug Help Desk
Can you share some code with me that doesn't work for you, so we can dig deeper?
Former SmugMug Product Team
aaron AT aaronmphotography DOT com
Website: http://www.aaronmphotography.com
My SmugMug CSS Customizations website: http://www.aaronmphotography.com/Customizations
I thought it was displaying but when I removed the 'local('Karate Medium');' from the @font-face, it "broke". This is what I'm using on my theme's CSS:
It works because I can see it here: http://www.imagesinthebackcountry.com/fonts/karate/karate-demo.html
Images in the Backcountry
My SmugMug Customizations | Adding CSS to Your Site | SEO for the Photographer | Locate Your Page/Widget Number | SmugMug Help Desk
Images in the Backcountry
My SmugMug Customizations | Adding CSS to Your Site | SEO for the Photographer | Locate Your Page/Widget Number | SmugMug Help Desk