- This topic has 11 replies, 4 voices, and was last updated 5 years, 1 month ago by
Tom.
-
AuthorPosts
-
April 8, 2021 at 12:49 pm #1726815
Matic
Hey,
I tried adding a custom font “Museo Sans” following your instructions (https://docs.generatepress.com/article/adding-local-fonts/), but I couldn’t make it work.
First, I thought that there might be something wrong with my font, so I repeated the process with a Google font from: https://google-webfonts-helper.herokuapp.com/fonts/abel
1. I’ve read all the support articles; none solve my issue.
2. I disabled caching.
3. I am using a child theme.
4. Here’s my style.css code for the Google font (Abel):@font-face { font-family: 'Abel'; font-style: normal; font-weight: 400; src: url('https://www.photutorial.com/wp-content/themes/generatepress_child/Fonts/abel-v12-latin-regular.eot'); /* IE9 Compat Modes */ src: local('Abel'), local('Abel-Regular') url('https://www.photutorial.com/wp-content/themes/generatepress_child/Fonts/abel-v12-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('https://www.photutorial.com/wp-content/themes/generatepress_child/Fonts/abel-v12-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */ url('https://www.photutorial.com/wp-content/themes/generatepress_child/Fonts/abel-v12-latin-regular.woff') format('woff'), /* Modern Browsers */ url('https://www.photutorial.com/wp-content/themes/generatepress_child/Fonts/abel-v12-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */ url('https://www.photutorial.com/wp-content/themes/generatepress_child/Fonts/abel-v12-latin-regular.svg#Abel') format('svg'); /* Legacy iOS */ }5. You may check that the files are actually located there.
6. My functions.php code:add_filter( 'generate_typography_default_fonts', function( $fonts ) { $fonts[] = 'Abel'; return $fonts; } );7. Abel is still not loading in my Customizer. I can see “Abel” under “System fonts” in Typography, but it does not load.
I also tried copying CSS into “Additional CSS”.
Any ideas?
Cheers,
MaticApril 8, 2021 at 7:19 pm #1727022Elvin
StaffCustomer SupportHi there,
Can you try disabling your caching/optimization plugin and check again? (site seems to be running SG Optimizer).
Let us know how it goes.
April 9, 2021 at 12:53 am #1727228Matic
I tried disabling everything: SG Optimizer, Cloudflare, and NitroPack, but to no avail.
EDIT: Other fonts, both System and Google, load properly.
April 9, 2021 at 7:37 am #1727816David
StaffCustomer SupportHi there,
can you disable the cache plugins entirely so i can see why the Child Theme CSS is not loading.
April 9, 2021 at 9:32 am #1727961Matic
Sure thing. Could you let me know when you’ll be online, so I don’t leave it cache-less for hours?
April 10, 2021 at 4:49 am #1728533Matic
Any update? 🙂
April 10, 2021 at 7:16 am #1728874David
StaffCustomer SupportThe west coast team will generally log on around this time … so if you want to switch the caches off i am sure one of us will be available in the next hour or two.
April 10, 2021 at 7:24 am #1728881Matic
Alright, thanks for info 🙂 I disabled all caching.
April 10, 2021 at 10:16 am #1729060Tom
Lead DeveloperLead DeveloperHi there,
I’m still seeing Siteground Optimizer activated which makes it hard to read your source.
In order to debug this, I’ll need Abel (or whatever custom font) to be saved in the Customizer, and I’ll need to know which element it’s applied to so I can inspect it.
Let us know 🙂
April 10, 2021 at 10:24 am #1729071Matic
Hi,
I re-enabled my caching after 2 hours. If you want, I can give you credentials. I think this would be easier.
EDIT: I now tried reinstalling child theme. It did not help.
Cheers
April 11, 2021 at 8:10 am #1730016Matic
I managed to fix it. I am not sure what exactly helped, but I reuploaded the fonts, reinstalled the child theme and it started to work.
Cheers,
MaticApril 11, 2021 at 9:13 am #1730064Tom
Lead DeveloperLead DeveloperGlad you got it sorted! 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.