Site logo

Archived topic

Font Family

14 replies · Started by mohamedhassan on December 18, 2017

Viewing posts 1–15 of 15

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?

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+'.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/

1. Yup that's the javascript.

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

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.

Reply Please.

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

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

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

Sure you can!

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

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

Yup for sure :)

This archived topic is closed to new replies.