- This topic has 14 replies, 3 voices, and was last updated 4 years, 6 months ago by
Leo.
-
AuthorPosts
-
December 18, 2017 at 6:37 pm #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?
GP Premium 1.5.6December 18, 2017 at 9:05 pm #452617Leo
StaffCustomer SupportHi there,
Just to make sure, have you gone through the steps here?
https://generatepress.com/forums/topic/typekit-woes/#post-419832Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/December 19, 2017 at 12:01 am #452676mohamedhassan
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/December 19, 2017 at 5:24 am #452805Leo
StaffCustomer Support1. Yup that’s the javascript.
2. They are all the same? Tom’s example and screenshot should say it all.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/December 19, 2017 at 6:16 am #452855mohamedhassan
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/02. 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.
December 19, 2017 at 8:55 pm #453474mohamedhassan
Reply Please.
December 19, 2017 at 10:57 pm #453520Tom
Lead DeveloperLead DeveloperSo now when you select that font in the Customizer, it doesn’t work? If so, can you link me the page in question?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentDecember 19, 2017 at 11:22 pm #453533mohamedhassan
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%2FDecember 20, 2017 at 9:13 am #453926Tom
Lead DeveloperLead Developernimbus-sans
doesn’t exist in the font family dropdown?Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentDecember 20, 2017 at 9:29 am #453939mohamedhassan
Yes, nimbus-sans doesn’t exist in the font family dropdown!
December 20, 2017 at 10:45 pm #454277Tom
Lead DeveloperLead DeveloperI can take a closer look if you’d like to send me temporary admin login details: https://generatepress.com/contact/
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentDecember 21, 2017 at 7:59 am #454630mohamedhassan
Sure you can!
I’ll send you my admin login details right away.
December 21, 2017 at 8:38 am #454649Leo
StaffCustomer SupportIt is in there: https://s31.postimg.org/clrj9j8sr/2017-12-21_0837.png
Try using the search field and type your font in.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/December 21, 2017 at 10:07 am #454694mohamedhassan
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,
MohamedDecember 21, 2017 at 3:28 pm #454871Leo
StaffCustomer SupportYup for sure 🙂
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/ -
AuthorPosts
- You must be logged in to reply to this topic.