Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #242044

    Hi Kriesi,
    Thanks for the wonderful theme.

    How can the Open Sans font be hosted and called from my website without having to call the Google API?
    <!– google webfont font replacement –>
    <link id=”google_webfont_1″ rel=”stylesheet” type=”text/css” href=”http://fonts.googleapis.com/css?family=Open+Sans:400,600&#8243; />

    This is an open source font which I want to host on my own website instead.

    Thanks

    #242533

    Hey anfinnweb!

    You can download the font face kit here: http://www.fontsquirrel.com/fonts/open-sans

    Add the font using font face: http://www.w3schools.com/cssref/css3_pr_font-face_rule.asp

    Regards,
    Ismael

    #242623

    Hi Ismael,
    Thanks for the quick support.

    I have downloaded the font files and uploaded them to a /fonts/ directory and also added the following to the Quick CSS but the fonts are not loading:
    @font-face {
    font-family: “Open Sans”;
    font-style: normal;
    font-weight: 600;
    src: local(“Open Sans Semibold”), local(“OpenSans-Semibold”), url(“http://websitename.com/wordp/wp-content/themes/enfold/fonts/OpenSans-Semibold.ttf&#8221;) format(“ttf”);
    }
    @font-face {
    font-family: “Open Sans”;
    font-style: normal;
    font-weight: 400;
    src: local(“Open Sans”), local(“OpenSans”), url(“http://websitename.com/wordp/wp-content/themes/enfold/fonts/OpenSans-Regular.ttf&#8221;) format(“ttf”);
    }

    What is still required to make the fonts load and no longer call or show the Google Fonts in the Source Code?

    Thanks

    #242866

    Hey!

    Please try using this plugin http://wordpress.org/plugins/wp-font-face/

    Best regards,
    Yigit

    #243072

    Hello Yigit,
    Thanks for the link but your instructions and solution are completely different to Ismael’s.

    All I want to do is not call Google Fonts for anything, host the fonts on my website and then use these fonts for the website (Open Sans Regular & Open Sans Semibold)???

    Hasn’t this been done in the past by other people using Enfold?

    #243998

    Hey!

    While yes it has been done it isn’t really in the realm of what we cover through support. If using @font-face isn’t working for you can try asking on stack overflow, or as Yigit suggested using a plugin which takes the heavy lifting out of your hands.

    The issue you are probably running into is that once you stop telling the theme to use the google font it is no longer selected in the css. So even if you are correctly loading in the font it isn’t styled. The font-face rules need to have accompanying css rules to then style your font as well.

    Cheers!
    Devin

    #244667

    Hey Devin,
    Ok, thanks for the help. I’ll look at the plugin again and maybe try stack overflow.

    You can close this ticket if you like.

    Thanks

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Google Font Replacement’ is closed to new replies.