smugler.co - Using third party fonts on your SmugMug site

tomnovytomnovy Registered Users Posts: 1,102 SmugMug Employee
edited March 9, 2015 in SmugMug Customization
blog-feature-fonts.jpg

Hi friends,

New SmugMug customization tutorial on how to add non Google Fonts to your SmugMug site:

http://www.photom.me/Blog/Importing-Fonts-to-SmugMug

Enjoy!
SmugMug Support Hero | Customizer | My SmugMug site - http://www.photom.me | Customization Portal - https://customsmug.com/

Comments

  • Hikin' MikeHikin' Mike Registered Users Posts: 5,467 Major grins
    edited March 7, 2015
    I decided to give it a try again. I created a testing page, and unfortunately it doesn't work. The fonts work fine on my kid's WordPress site, but not on Smugmug. I added the fonts to my custom Theme and added two new classes to select each font.

    http://gallery.imagesinthebackcountry.com/Smugmug-customization/Testing-Fonts

    Part of my Theme's CSS
    @font-face {
        font-family: 'KarateMedium';
        src: url('http://www.thebackcountry.org/fonts/karate-webfont.eot');
        src: url('http://www.thebackcountry.org/fonts/karate-webfont.eot?#iefix') format('embedded-opentype'),
             url('http://www.thebackcountry.org/fonts/karate-webfont.woff') format('woff'),
             url('http://www.thebackcountry.org/fonts/karate-webfont.ttf') format('truetype'),
             url('http://www.thebackcountry.org/fonts/karate-webfont.svg#KarateMedium') format('svg');
        font-weight: normal;
        font-style: normal;
        }
        
    @font-face {
        font-family: 'ZebraRegular';
        src: url('http://www.thebackcountry.org/fonts/zebra_01-49-58-webfont.eot');
        src: url('http://www.thebackcountry.org/fonts/zebra_01-49-58-webfont.eot?#iefix') format('embedded-opentype'),
             url('http://www.thebackcountry.org/fonts/zebra_01-49-58-webfont.woff') format('woff'),
             url('http://www.thebackcountry.org/fonts/zebra_01-49-58-webfont.ttf') format('truetype'),
             url('http://www.thebackcountry.org/fonts/zebra_01-49-58-webfont.svg#ZebraRegular') format('svg');
        font-weight: normal;
        font-style: normal;
        }
        
    .karate-font {
        font-family: 'KarateMedium' !important;
        }
    
    .zebra-font {
        font-family: 'ZebraRegular' !important;
        }    
    
    My custom page
    [html]
    <div class="karate-font">Karate Medium Font</div>
    <div class="zebra-font">Zebra Regular Font</div>
    [/html]
  • tomnovytomnovy Registered Users Posts: 1,102 SmugMug Employee
    edited March 7, 2015
    Hi Mike,

    Could you please send me the font files ? Post a dropbox or a google drive link here.

    I will check this for you
    SmugMug Support Hero | Customizer | My SmugMug site - http://www.photom.me | Customization Portal - https://customsmug.com/
  • tomnovytomnovy Registered Users Posts: 1,102 SmugMug Employee
    edited March 7, 2015
    Mike,

    It worked for me fine - see my screenshot:

    http://take.ms/H8Gxp

    Try using this css code to import your font:
    @font-face {
        font-family: 'karatemedium';
        src: url('https://dl.dropboxusercontent.com/u/10270090/fonts/Karate-webfont.eot');
        src: url('https://dl.dropboxusercontent.com/u/10270090/fonts/Karate-webfont.eot?#iefix') format('embedded-opentype'),
             url('https://dl.dropboxusercontent.com/u/10270090/fonts/Karate-webfont.woff2') format('woff2'),
             url('https://dl.dropboxusercontent.com/u/10270090/fonts/Karate-webfont.woff') format('woff'),
             url('https://dl.dropboxusercontent.com/u/10270090/fonts/Karate-webfont.ttf') format('truetype'),
             url('https://dl.dropboxusercontent.com/u/10270090/fonts/Karate-webfont.svg') format('svg');
        font-weight: normal;
        font-style: normal;
    
    }
    

    It could be that your FTP server does not support HTTPS connection.
    SmugMug Support Hero | Customizer | My SmugMug site - http://www.photom.me | Customization Portal - https://customsmug.com/
  • Hikin' MikeHikin' Mike Registered Users Posts: 5,467 Major grins
    edited March 7, 2015
  • tomnovytomnovy Registered Users Posts: 1,102 SmugMug Employee
    edited March 8, 2015
    I tried that and that didn't work.

    Mike,

    You have copied my code without the @ sign at the beginning. I have also added a css code to your HTML content block - now everything works fine.
    SmugMug Support Hero | Customizer | My SmugMug site - http://www.photom.me | Customization Portal - https://customsmug.com/
  • Hikin' MikeHikin' Mike Registered Users Posts: 5,467 Major grins
    edited March 8, 2015
    tomnovy wrote: »
    Mike,

    You have copied my code without the @ sign at the beginning. I have also added a css code to your HTML content block - now everything works fine.

    Thanks.

    I had the same code you added to HTML block on my custom Theme CSS already.
  • tomnovytomnovy Registered Users Posts: 1,102 SmugMug Employee
    edited March 9, 2015
    Mike,

    That code would not work if you add it in the theme settings, instead of using it in the HTML block. Also - there was an @ sign missing at the beginning of the font import code.
    SmugMug Support Hero | Customizer | My SmugMug site - http://www.photom.me | Customization Portal - https://customsmug.com/
  • Hikin' MikeHikin' Mike Registered Users Posts: 5,467 Major grins
    edited March 9, 2015
    I saw that I missed the @ the first time. It's odd because I removed the code in the HTML block and it's working. The other font isn't loading, but since this was just a test, I'm not going to worry about it until I need to use non-Google fonts for real.

    Thanks! thumb.gif
Sign In or Register to comment.