- This topic has 14 replies, 3 voices, and was last updated 3 years, 4 months ago by
David.
-
AuthorPosts
-
November 27, 2022 at 9:55 am #2437528
Paul
Hi There,
I wanting to add some a local font – I followed the instructions in the docs but not working for me. Any ideas on what I’m doing wrong?
Please see detail in private info.Cheers
PaulNovember 27, 2022 at 1:00 pm #2437790Ying
StaffCustomer SupportHi there,
Our document for adding local fonts doesn’t include this PHP snippet anymore, as we’ve introduced the dynamic typography system to GP.
Please make sure you are following this documentation: https://docs.generatepress.com/article/adding-local-fonts/
The video should show it pretty straightforward.Just checked your CSS, the URLs lead to the 404 page, they are not correct.
November 28, 2022 at 4:14 am #2438666Paul
Thanks for info Ying – I fixed the issue with URLs and followed the video – although still can’t see the font in the customiser – any ideas on what I’ve done wrong?
November 28, 2022 at 6:48 am #2438876David
StaffCustomer SupportHi there,
in Customizer > Typography -> Font Manager -> Add New Font.
In the field provided paste in your font-family name as it is in your @font-face eg.HelveticaNowText
DO NOT set it to use the Google Font API.Now when you Add Typography, you will be able to select your custom font.
November 28, 2022 at 7:41 am #2438993Paul
Hi David,
I’d already done that I can see the font in the drop-down but doesn’t update the font.
Would you like admin access so you can view?Cheers
PaulNovember 28, 2022 at 8:24 am #2439289David
StaffCustomer SupportTry converting the OTF fonts to .woff and .woff 2 files. As my browsers are refusing to load those OTF fonts.
The Font Squirrel site has a generator that can do that for you.November 28, 2022 at 8:40 am #2439316Paul
Thanks David I’ll give it a try!
November 28, 2022 at 9:40 am #2439437David
StaffCustomer SupportLet us know how you get on!
November 29, 2022 at 3:22 pm #2441942Paul
Hi David,
I converted to .woff and uploaded via FTP and updated the CSS then updated customiser settings but still not working?
Any ideas?
CSS in private info.
Do I need to update this line?
src: local(”),Cheers
November 29, 2022 at 4:57 pm #2441995Ying
StaffCustomer SupportI’m not seeing the
@font-faceCSS forHelvetica Now Texton your site, but I do see@font-faceCSS forRobotofont.
How did you add it?November 30, 2022 at 3:43 am #2442490Paul
Hi Ying,
Thanks for looking into it. I added the CSS via the child theme (see attached screengrab) but doesn’t show in the code – any idea why?
As a test I added the below the CSS to the ‘Additional CSS’ in the customiser and now seeing in source BUT font still not displaying (gah!)
Do you know what I’m doing wrong?
Thanks
November 30, 2022 at 4:12 am #2442539Paul
Morning David,
Any chance you could help with this one?
Cheers
PaulNovember 30, 2022 at 5:20 am #2442615David
StaffCustomer SupportAlmost there –
change your @font-face to:
@font-face { font-family: 'HelveticaNowText'; font-style: normal; font-weight: 400; src: local(''), url('https://the-zag-v6.instawp.xyz/wp-content/themes/Paul-Kelsall-Starter-Theme/fonts/helveticanowtext-regular-webfont.woff2') format('woff2'), /* Super Modern Browsers */ url('https://the-zag-v6.instawp.xyz/wp-content/themes/Paul-Kelsall-Starter-Theme/fonts/helveticanowtext-regular-webfont.woff') format('woff'), /* Pretty Modern Browsers */ url('https://the-zag-v6.instawp.xyz/wp-content/themes/Paul-Kelsall-Starter-Theme/fonts/helveticanowtext-bold-webfont.woff2') format('woff2'), /* Super Modern Browsers */ url('https://the-zag-v6.instawp.xyz/wp-content/themes/Paul-Kelsall-Starter-Theme/fonts/helveticanowtext-bold-webfont.woff') format('woff'), /* Pretty Modern Browsers */ url('https://the-zag-v6.instawp.xyz/wp-content/themes/Paul-Kelsall-Starter-Theme/fonts/helveticanowtext-regita-webfont.woff2') format('woff2'), /* Super Modern Browsers */ url('https://the-zag-v6.instawp.xyz/wp-content/themes/Paul-Kelsall-Starter-Theme/fonts/helveticanowtext-regita-webfont.woff') format('woff'); /* Pretty Modern Browsers */ }Then your font name in the Customizer should be:
HelveticaNowTextNovember 30, 2022 at 7:56 am #2443045Paul
Awesome David – that’s working now! Much appreciated as always!
November 30, 2022 at 8:27 am #2443092David
StaffCustomer SupportGlad to hear that!
-
AuthorPosts
- You must be logged in to reply to this topic.