Site logo

Archived topic

Problem changing fonts

32 replies · Started by Enrico on November 4, 2021

Viewing posts 16–30 of 33

Have you installed a new child theme?

Hi there,

Your site is still getting this error - https://share.getcloudapp.com/p9uNQow5

It must be one of the files on the child theme folder.

Can you try temporarily removing all of them except style.css and functions.php and see if it still occurs?

If it still occurs, can you try temporarily replacing the contents of the mentioned files to the default of the .zip file 1 by 1 to check which is the culprit file?
https://generatepress.com/api/themes/generatepress_child.zip

Note: It may be the empty .min.css file but let's check all to be sure.

Hello again.
I tried to follow your instructions, but it seems it doesn't help.
I upload again the old child_theme. I do not see anymore the erros "This theme is corrupt. The parent...", but as you know I'm a beginner.
After that, I went to ppearance - Customize > Typography and I changed the font sizes. It seems that works now.
But, the tab "Google font-display" disappears.
I'm not sure all is correct :-(

FYI, I'M still using a snippet and all the intructions I saw here: https://docs.generatepress.com/article/adding-local-fonts/

Please, may you have one more look?
Thank you very much.

I am still seeing this in your Themes:

https://www.screencast.com/t/LJKaIUvCabC

Something is not correct - with either the Parent Theme or the Child Theme.
I would recommend:

1. Delete both the GeneratePress and GP Child theme from the server using FTP.
2. Reinstall GeneratePress Theme.
3. Install a new clean copy of the child theme zip

Once thats done make sure the Child Theme is Active and the above error image is not shown

Thanks David.
Just a question: if I delete both the GeneratePress and GP Child theme waht happen at my website.
I'm afraid of destroying all the graphics on the site :-(
thank you.

I did, and the error image is not shown now.
I deleted the staging site, too.
Last question, please:
time ago I added Google Fonts as you explain here: https://docs.generatepress.com/article/adding-local-fonts/
What must I do now? Can I deleted thi snippet:

add_filter( 'generate_typography_default_fonts', function( $fonts ) {
     $fonts[] = 'Montserrat';
     $fonts[] = 'Inika';
   return $fonts;
} );

And what about the CSS I copied from Google Fonts Helper website and I added in my custom CSS?

Thanks alot!

Yes you can delete this snippet:

add_filter( 'generate_typography_default_fonts', function( $fonts ) {
     $fonts[] = 'Montserrat';
     $fonts[] = 'Inika';
   return $fonts;
} );

Now in the Typography > Font Manger you just type the font-family name eg. Montserrat into the field. And make sure the Google Font Toggle is OFF

Thank you very much!

Is it working now ?

To be honest,
I'm not sure all is working well.
I still have some doubts, due to my poor technical experience
You said that I can delete the snippet. OK, I did.
Anyway, I must add local fonts as yoy suggest here, https://docs.generatepress.com/article/adding-local-fonts/ , it isn't?
If you have time, may you please login to my site and have a look if the typography is working in the right way?
Le me know...
Ciao

Hi Enrico,

I checked your site, the @font-face CSS has some issue, all the URL of the fonts files leading to the 404 page.

Please make sure the URL is in this format: http://gp-test.local/wp-content/uploads/2019/02/open-sans-v15-latin-regular.woff2

In your CSS, the2019/02is missing.

Hello Ying,
thanks for helping me.
I'm not sure you are checking the right URL.
In my website my uploads are not rrganize into month- and year-based folders.
So, you can find fonts here
https://www.guidedolomiti.com/wp-content/uploads/montserrat-v18-latin-regular.woff2
Also, as I wrote before, bear in mind that I deleted the staging theme.
Thank you.

OK so you have a couple of errors in this CSS. Can you delete this:

@font-face {
    font-family: 'Inika';
    font-style: normal;
    font-weight: 400;
    src: url('https://www.guidedolomiti.com/wp-content/uploads/inika-v11-latin-regular.eot'); /* IE9 Compat Modes */
    src: local(''),
         url('https://www.guidedolomiti.com/wp-content/uploads/inika-v11-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
         url('https://www.guidedolomiti.com/wp-content/uploads/inika-v11-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */
         url('https://www.guidedolomiti.com/wp-content/uploads/inika-v11-latin-regular.woff') format('woff'), /* Modern Browsers */
          

Thanks David,
I deleted that CSS rules.
When I uploaded the fonts in the Media Library, I added the following function in my website

add_filter( 'upload_mimes', function( $mimes ) {
    $mimes['woff']  = 'application/x-font-woff';
    $mimes['woff2'] = 'application/x-font-woff2';
    $mimes['ttf']   = 'application/x-font-ttf';
    $mimes['svg']   = 'image/svg+xml';
    $mimes['eot']   = 'application/vnd.ms-fontobject';

    return $mimes;
} );

but it was not allowed to upload the True Type fonts (.ttf).
Is it a problem?
Thanks for your patience.

This archived topic is closed to new replies.