Site logo

Archived topic

Change fonts

13 replies · Started by María on August 12, 2021

Viewing posts 1–14 of 14

Hello,

I did a change font following this article https://docs.generatepress.com/article/adding-local-fonts/#using-font-face

But is not working.

I think is because CSS is not working, but I don't know why.

I wrote this code at the end of style.css

@font-face {
font-family: 'Baroneys Textured';
font-weight: normal;
font-style: normal;
src: url('http://des.sibbaris.es/wp-content/uploads/2021/08/BaroneysTextured.eot');
src: local ('BaroneysTextured'), local ('Baroneys Textured'),
url ('http://des.sibbaris.es/wp-content/uploads/2021/08/BaroneysTextured.eot?#iefix') format('embedded-opentype'),
url('http://des.sibbaris.es/wp-content/uploads/2021/08/BaroneysTextured.woff2') format('woff2'),
url('http://des.sibbaris.es/wp-content/uploads/2021/08/BaroneysTextured.woff') format('woff'),
url('http://des.sibbaris.es/wp-content/uploads/2021/08/BaroneysTextured.ttf') format('truetype'),
url('http://des.sibbaris.es/wp-content/uploads/2021/08/BaroneysTextured.svg#BaroneysTextured') format('svg');
}

Can you help me, please?

Thanks

Hi there,

can you share a link to the site and a password to get past the maintenance screen so we can take a look.

You can share those details in the Private Information field.

Hello,

Do you mean a my credential of WordPress or I can create you a user?

Thanks

Hi Maria,

Just to make sure you've done all the steps introduced in the article.

1.Downloading font.
2.Uploading font.
3.Using @font-face CSS.
4.Using PHP to add font to customizer.

And please creates a user for us, so we can see the site instead of the Maintainance mode.

Let me know :)

Hello,

Yes, I did all. PHP is working, but not CSS, Have I to include in style.css? Maybe is in another archive file...

Thanks

Yes, you can add CSS to style.css if you are using a child theme.

Otherwise, just add the CSS to customizer > additional CSS, you can give it a try as well.

And can you send us access to your site?

Hello,

I did you a user to have a look.

Thanks.

Hi Maria,

I logged in had a quick look, then the site is not responding anymore.
https://www.screencast.com/t/g3rfsRv6IR

I see the CSS in customizer > addtional CSS, if you can log in, try change font-family: 'BaroneysTextured'; to font-family: 'Baroneys Textured'; to test.

Let me know :)

Hello,

It's still not working. I don't know the problem.

What can I do?

Thanks

Can you share the PHP Snippet that you added to include the font in the Customizer.

NOTE: When adding code to your replies, please highlight the code, and click the Code button before submitting. This will keep the codes formating in this forum.

Hello,

Ok, but I give the user and pasword to another customer support (Ying) to see inside Wordpress.

Here is:

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

Thanks

Where did you get the CSS? I just use a CSS validating tool to check, seems there're some errors.

Can you try this one that I corrected?

@font-face {
font-family : 'BaroneysTextured';
font-weight : normal;
font-style : normal;
src : url("http://des.sibbaris.es/wp-content/uploads/2021/08/BaroneysTextured.eot");
src : local(''), url("http://des.sibbaris.es/wp-content/uploads/2021/08/BaroneysTextured.eot?#iefix") format('embedded-opentype'), url("http://des.sibbaris.es/wp-content/uploads/2021/08/BaroneysTextured.woff2") format('woff2'), url("http://des.sibbaris.es/wp-content/uploads/2021/08/BaroneysTextured.woff") format('woff'), url("http://des.sibbaris.es/wp-content/uploads/2021/08/BaroneysTextured.ttf") format('truetype'), url("http://des.sibbaris.es/wp-content/uploads/2021/08/BaroneysTextured.svg#BaroneysTextured") format('svg');
}

Hello,

Yes, this works.

Thank you so much I was very worried.

Best regards

Bye bye

You are welcome :)

This archived topic is closed to new replies.