Use a custom font

Hello,
I have to modify a website based on Beaver theme. I wish to change the font and add a custom font. I created a new directory called fonts in bb-theme directory (the child is not used) and upload the fonts (woff, woof2, eot, …) into this new directory.
In style.css, I added this code
@font-face {
font-family: ‘moonbold’;
font-weight: bold;
src: url(‘fonts/Moon Bold.otf’) format(‘otf’);
src: url(‘fonts/moon_bold-webfont.eot’);
src: url(‘fonts/moon_bold-webfont.eot?#iefix’) format(‘embedded-opentype’),
url(‘fonts/moon_bold-webfont.woff2’) format(‘woff2’),
url(‘fonts/moon_bold-webfont.woff’) format(‘woff’),
url(‘fonts/moon_bold-webfont.ttf’) format(‘truetype’),
url(‘fonts/moon_bold-webfont.svg#moonbold’) format(‘svg’);

font-style: normal;

}

But it doesn’t work.
I installed Use Any Font and added my custom font and it works.
Is it a reason why it doesn’t work in the first case ?

Thanks a lot

First and foremost, you’ll want to use the child theme for this as every time you update the BB theme you’d need to re-do this.

You’re right. But as the theme was already installed before I work on it, I don’t know if there are others changes and I’m afraid to disturb the website if the child theme is activated. i don’t know very well that, I work more with Prestashop. Is it possible to use the child theme only for my changes ?

thanks

No, but this should take care of the Customizer portion: https://kb.wpbeaverbuilder.com/article/748-move-parent-theme-customizer-settings-to-a-child-theme

No changes should ever be made directly to a parent theme’s files.