New Landing How can we help? Themeforest Theme Support Supreme Force latin exteneded in Google fonts

Viewing 4 posts - 1 through 4 (of 4 total)
  • Posted in: Supreme
  • #178892
    acrncevi
    Member
    Post count: 61

    Hi! Could you please give me an aivce with this.

    I’m using Google’s Opens Sans web font.
    I’v tryed to force latin-extened adding ::latin-ext sufix in JS font loader. But it’s not working. Letters like čćžšđ are still showing up in dafault font.

    <script>
    WebFontConfig = {
    google: { families: [‘Open Sans::latin,latin-ext’, ‘Open Sans::latin,latin-ext’, ‘Open Sans::latin,latin-ext’, ‘Vidaloka’] }
    };

    (function() {
    document.getElementsByTagName(“html”)[0].setAttribute(“class”,”wf-loading”)
    // NEEDED to push the wf-loading class to your head
    document.getElementsByTagName(“html”)[0].setAttribute(“className”,”wf-loading”)
    // for IE…

    var wf = document.createElement(‘script’);
    wf.src = (‘https:’ == document.location.protocol ? ‘https’ : ‘http’) +
    ‘://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js’;
    wf.type = ‘text/javascript’;
    wf.async = ‘false’;
    var s = document.getElementsByTagName(‘script’)[0];
    s.parentNode.insertBefore(wf, s);
    })();
    </script>

    #179006
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Where did you make these script changes? Please use code like this.

    <script>
    WebFontConfig = {
    google: { families: ['Open Sans::latin-ext', 'Vidaloka'] }
    };
    
    (function() {
    document.getElementsByTagName("html")[0].setAttribute("class","wf-loading")
    // NEEDED to push the wf-loading class to your head
    document.getElementsByTagName("html")[0].setAttribute("className","wf-loading")
    // for IE…
    
    var wf = document.createElement('script');
    wf.src = ('https:' == document.location.protocol ? 'https' : 'http') +
    '://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
    wf.type = 'text/javascript';
    wf.async = 'false';
    var s = document.getElementsByTagName('script')[0];
    s.parentNode.insertBefore(wf, s);
    })();
    </script>

    Thanks
    Mohammad

    #179347
    acrncevi
    Member
    Post count: 61
    This reply has been marked as private.
    #179379
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Its perfect code. You need to just insert comma [,] before ‘Vidaloka’.
    Thanks
    Mohammad

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register