Custom Font URL – Secure Content Error

Support Forums for LiveMesh Themes & Plugins Forums Invent Theme Support Custom Font URL – Secure Content Error

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #16181
    sapgen
    Member

    Hi,

    I am installing a Custom Font.I have followed the post http://support.livemeshthemes.com/faqs/install-custom-fonts/ and set it up. When I use https url in the Theme Options CSS to point to the font location in the server, the fonts are not loading when I access the site using http url. If I use http url in the css, the site shows secure content error when I access the site using https.

    Could you please let me know if there is a better way to point to the font folder, so that both http and https can work?

    The site is at http://coursible.com/i/ (and https://coursible.com/i/)
    Thanks.

    #16206
    Veena
    Moderator

    In framework/extensions/stylizer.php file you need to modify line no:235 to –

     $fonts_import .= '@import url(//fonts.googleapis.com/css?family=' . $fonts_to_import . ');';
    

    and works for both http/https cases.
    This fix will be part of next update for all themes

    #16221
    sapgen
    Member

    Sorry, I didnt mention that I am trying to use purchased webfonts, which I have downloaded and installed in a local folder, as suggested in http://support.livemeshthemes.com/faqs/install-custom-fonts/.

    When installed in a local folder, the post suggests to use the url as http://coursible.com/i/{folder}. This url is the one that works for only either http or https, and I would like to be able to use for both.

    #16241
    Raghavendra
    Moderator

    The post is quite an old one and needs an update for HTTPS. Pls use CSS which looks like below to make it work seamlessly across both HTTP/HTTPS.

    @font-face {
    font-family: 'MuseoSlab-500';
    src: url('//mydomain.com/wp-content/webfonts/26B0C6_0_0.eot');
    src: url('//mydomain.com/wp-content/webfonts/26B0C6_0_0.eot?#iefix') format('embedded-opentype'),url('//mydomain.com/wp-content/webfonts/26B0C6_0_0.woff') format('woff'),url('//mydomain.com/wp-content/webfonts/26B0C6_0_0.ttf') format('truetype');
    }
    

    Basically, all we are doing here is to omit the http/https prefix for the URL. This way the right prefix will be used depending on type of request.

    #16244
    sapgen
    Member

    Great! Works fine!

    Thank you!

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Custom Font URL – Secure Content Error’ is closed to new replies.