- This topic has 14 replies, 2 voices, and was last updated 3 years, 3 months ago by
David.
-
AuthorPosts
-
May 24, 2022 at 7:30 am #2230923
sparkle
I have a project that requires me to use local fonts, not google fonts. Since the google fonts list in the customizer has a variation of this font, I’d like to disable that completely so I’m certain to be using the local fonts.
I’ve tried using these solutions, but the customizer still loads the google font list.
https://docs.generatepress.com/article/remove-google-fonts/I’m also wondering if there are instructions for uploading multiple fonts from a folder in the child theme? The project requires six variations of IBMPlexSans (Regular, Medium Bold, Semi Bold and some Italic Variations) and I have them all in a font folder in my child theme. Do I need to create blocks like this for all six type variants? What if I’m not provided with an svg version?
/* IBM Plex Sans - Regular */ @font-face { font-family: 'IBMPlexSans'; font-style: normal; font-weight: 400; src: url('https://www.mywebsite.com/wp-content/themes/generatepress-child/fonts/IBMPlexSans-Regular.eot'); /* IE9 Compat Modes */ src: local(''), url('https://www.mywebsite.com/wp-content/themes/generatepress-child/fonts/IBMPlexSans-Regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('https://www.mywebsite.com/wp-content/themes/generatepress-child/fonts/IBMPlexSans-Regular.woff2') format('woff2'), /* Super Modern Browsers */ url('https://www.mywebsite.com/wp-content/themes/generatepress-child/fonts/IBMPlexSans-Regular.woff') format('woff'), /* Modern Browsers */ url('https://www.mywebsite.com/wp-content/themes/generatepress-child/fonts/IBMPlexSans-Regular.ttf') format('truetype'), /* Safari, Android, iOS */ url('https://www.mywebsite.com/wp-content/themes/generatepress-child/fonts/IBMPlexSans-Regular.svg#IBMPlexSans-Regular') format('svg'); /* Legacy iOS */ }
May 24, 2022 at 7:39 am #2230929David
StaffCustomer SupportHi there,
you will need to create a
@font-face
rule for each of the font-weight variants that you want to add.
The actual font files you will load for each rule ( eot, woff, woff2, ttf, svg etc ) is up to you.For modern browsers
woff
andwoff2
are all thats generally required so you could simply load them eg./* IBM Plex Sans - Regular */ @font-face { font-family: 'IBMPlexSans'; font-style: normal; font-weight: 400; src: local(''), url('https://www.mywebsite.com/wp-content/themes/generatepress-child/fonts/IBMPlexSans-Regular.woff2') format('woff2'), /* Super Modern Browsers */ url('https://www.mywebsite.com/wp-content/themes/generatepress-child/fonts/IBMPlexSans-Regular.woff') format('woff'); /* Modern Browsers */ }
May 24, 2022 at 7:50 am #2231045sparkle
so frustrating, because even when i use your code, i still get default fonts in the display.
May 24, 2022 at 7:51 am #2231083sparkle
included is my code and the url in the notes area.
May 24, 2022 at 7:55 am #2231132David
StaffCustomer SupportSorry i really didn’t answer your first ( and main ) part of your question.
When you Add Font, that Google List will always be displayed, i am not sure if there is a filter for that – i can check (?).
But if you add a Font there and make sure the Google Font toggle is unchecked then it won’t load the font from Googles serversMay 24, 2022 at 7:57 am #2231139sparkle
yeah, i have it toggled properly in the screenshot i sent but my fonts are still default. 🙁
May 24, 2022 at 8:23 am #2231186David
StaffCustomer SupportSo whats the issue ?
Is it still making a Google font request ?May 24, 2022 at 8:31 am #2231192sparkle
i don’t think so? i’ve added all my fonts in my css. i’ve added all of them with the google toggle off in the customizer. i’ve set the body font to an uploaded font, but am still seeing times new roman or whatever serif font it’s defaulting to
May 24, 2022 at 8:36 am #2231196David
StaffCustomer SupportCan i see the site ?
May 24, 2022 at 8:37 am #2231197sparkle
yes. link below should work. 🙂 don’t worry about a password, the content you see is all there is.
May 24, 2022 at 8:41 am #2231203David
StaffCustomer SupportOk so customizer is doing the correct thing.
But the fonts are 404ing.Can you double check that the URL in the @font-face is correct ?
May 24, 2022 at 8:48 am #2231216sparkle
yup… seems right… screenshots attached.
May 24, 2022 at 8:59 am #2231234David
StaffCustomer SupportLooks like hyphen vs underscore.
In your @font-face you have
/generatepress-child
and i think it should be/generatepress_child
May 24, 2022 at 9:01 am #2231235sparkle
oh good grief. i’m going to make your holiday bloopers reel. it’s always some symbol or another. i’m sorry. lol. thank you as always for being patient with me.
May 24, 2022 at 9:03 am #2231237David
StaffCustomer Support🙂 Glad i could be of help
-
AuthorPosts
- You must be logged in to reply to this topic.