[Resolved] Font Family

Home Forums Support [Resolved] Font Family

Home Forums Support Font Family

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #452554
    mohamedhassan

    Dear Support team,
    Always I’ve confusion regarding setting font in my website. As I want to use one of typekit and the default font family that already exist in the theme resist change.

    How can I handle that?

    #452617
    Leo
    Staff
    Customer Support

    Hi there,

    Just to make sure, have you gone through the steps here?
    https://generatepress.com/forums/topic/typekit-woes/#post-419832

    #452676
    mohamedhassan

    1. Take the javascript they give you, and paste it into the wp_footer hook in “Appearance > GP Hooks”.
    is this code (below) the JavaScript code ?

    <script>
    (function(d) {
    var config = {
    kitId: ‘pbr7fyc’,
    scriptTimeout: 3000,
    async: true
    },
    h=d.documentElement,t=setTimeout(function(){h.className=h.className.replace(/\bwf-loading\b/g,””)+” wf-inactive”;},config.scriptTimeout),tk=d.createElement(“script”),f=false,s=d.getElementsByTagName(“script”)[0],a;h.className+=” wf-loading”;tk.src=’https://use.typekit.net/’+config.kitId+&#8217;.js’;tk.async=true;tk.onload=tk.onreadystatechange=function(){a=this.readyState;if(f||a&&a!=”complete”&&a!=”loaded”)return;f=true;clearTimeout(t);try{Typekit.load(config)}catch(e){}};s.parentNode.insertBefore(tk,s)
    })(document);
    </script>

    2. Grab the name they give you for the font-family value.
    Please take a look at the screen shot below.
    https://postimg.org/image/tyiblla57/

    #452805
    Leo
    Staff
    Customer Support

    1. Yup that’s the javascript.

    2. They are all the same? Tom’s example and screenshot should say it all.

    #452855
    mohamedhassan

    Dear Leo,
    I made the steps but I don’t see any result!

    What I’ve done below.
    1. I put the javascript they gave as shown above, and paste it into the wp_footer hook in “Appearance > GP Hooks”.
    https://gmkr.io/s/5a39ec5663d91b4ca2dcd10b/0

    2. the font family that I want to use is “nimbus-sans” so I inserted it into the code below instead of proxima-nova to be
    add_filter( ‘generate_typography_default_fonts’, ‘tu_add_typekit_fonts’ );
    function tu_add_typekit_fonts( $fonts ) {
    $fonts[] = ‘nimbus-sans’;
    return $fonts;
    }

    then I put code in code snippet plugin as shown in this screenshot https://gmkr.io/s/5a391dfceb9c9427e8e4454f/0
    However tell now it has not shown as an option in the Customizer!

    waiting your help.

    #453474
    mohamedhassan

    Reply Please.

    #453520
    Tom
    Lead Developer
    Lead Developer

    So now when you select that font in the Customizer, it doesn’t work? If so, can you link me the page in question?

    #453533
    mohamedhassan

    I cannot find the new font family in the customizer to select.
    I’m not sure which page do you mean?
    http://www.gloobally.com/wp-admin/customize.php?url=http%3A%2F%2Fwww.gloobally.com%2F

    #453926
    Tom
    Lead Developer
    Lead Developer

    nimbus-sans doesn’t exist in the font family dropdown?

    #453939
    mohamedhassan

    Yes, nimbus-sans doesn’t exist in the font family dropdown!

    #454277
    Tom
    Lead Developer
    Lead Developer

    I can take a closer look if you’d like to send me temporary admin login details: https://generatepress.com/contact/

    #454630
    mohamedhassan

    Sure you can!

    I’ll send you my admin login details right away.

    #454649
    Leo
    Staff
    Customer Support

    It is in there: https://s31.postimg.org/clrj9j8sr/2017-12-21_0837.png

    Try using the search field and type your font in.

    #454694
    mohamedhassan

    it’s great!

    Thank you very much. Now I’d like to add another font family for headings.
    Where do I past the new JavaScript? In wp_footer too!

    Regards,
    Mohamed

    #454871
    Leo
    Staff
    Customer Support

    Yup for sure 🙂

Viewing 15 posts - 1 through 15 (of 15 total)
  • You must be logged in to reply to this topic.