Custom fonts, font bulk setting

Posted in: Newspaper
Post count: 15

Hello,
I changed the font to custom one as the one you/Google provides has no Extended charsets.

And then I had to set all fonts in settings to my custom one multiple times.
You should REALLY have a button “Set all fonts to {Font name}”.

Then I noticed that faux bold looks just terrible.
So I want to add my custom font face in child theme or however is possible like that:

@font-face {
font-family: 'Montserrat';
src: url('fonts/Montserrat-Light.otf') format("opentype");
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'Montserrat';
src: url('fonts/Montserrat-SemiBold.otf') format("opentype");
font-weight: bold;
font-style: normal;
}

But it just does not stick!
So how do I set custom font variations in this theme?

Post count: 22421

Hi,
You can use this method to add your font(you can add the code in the theme panel->custom css) but the problem with your code is the path for the file. You need to have an absolute url to the file in order for the custom font to be loaded by the theme. As an example, on my localhost, the absolute url will be this one:
http://localhost/wordpress/wp-content/themes/Newspaper/images/icons/mycustomfont.woff2
You need to identify the exact path to your file and you can test if the path is correct when you use it in your browser. If the path is correct, then the browser should download the file: http://screencast.com/t/mOkkyg7Cx3X, ifg the URL is incorrect, the browser will return a 404 error.
I hope this hleps
Thanks.

Viewing 2 posts - 1 through 2 (of 2 total)
The forum ‘Newspaper’ is closed to new topics and replies.