Do I really need to change all the text fields for fonts?

Posted in: Newspaper
Post count: 4

Hi,

I want to change all the fonts to Open Sans, is there a faster way to do that than to change all the selectboxes for all the menu, modules, body, post content, etc.

Post count: 23312

Hello falz,

Unfortunately, our theme does not have such option to change the fonts for all website. The theme uses by default Open Sans and Roboto. The simplest way to achieve this, would be to search/replace these kinds of fonts with your desired font in style.css, like this -> http://screencast.com/t/QqveC5k0B

Hope this helps and let us know how it goes!

Thank you for the message!

Post count: 9

If I have a child theme, I suppose that I’ll need to copy all the style that have the fonts style applied and paste it in my child theme style.css to override it?

Would you be able in your next update to add an option in the theme panel font settings to override all the fonts? I think a lot of people need that feature.

Thanks,

Post count: 23312

Hello kreacom,

If you want to do a child theme with your desired fonts, this will override these styles from the main theme. If you want to do this for all the fonts in our theme, you can change the style.css with search and replace option and see how it works for you.

I will add your suggestion to our list and hopefully, in a future update, maybe we will be able to implement such an option.

Hope this helps!

Thank you for your suggestion.

Post count: 10

Hi Catalin,

Apart from the CSS changes (that would fix the ‘visual side’ of the issue), Is there a way to avoid the theme to load the styles related to that couple of fonts? That should improve the speed of the whole site.

I tried overwriting ‘includes/td_config.php’ (lines starting on 3253) from the child theme without much luck.

Many thanks in advance!

Post count: 22421

Hello,

You can remove roboto from td-config by commenting out or deleting this code: http://screencast.com/t/TOUVcBSCp6NQ but this file cannot be modified in the child theme. You will have to edit it in the main theme files.

Thank you!

Post count: 30

Hi, I think that it would be good to change the default fonts (Open Sans and Roboto) from theme panel if it is possible in next theme releases. Then we don’t have to change lost of select boxes form ‘default’ to specified fonts.

thanks,
Tibor

Post count: 23312

Hello cstibi,

At the moment, the single way to change it is how I presented you above. In a future update, it is possible but we cannot say for sure if it will get done in the next update because it is not a simple task and also, we have a big list of fixes, improvements and suggestions to implement. It’s hard to filter them and select which one gets implemented now and which one gets postponed. The developers will decide if it gets done or not, though.

Thank you for your understanding!

Post count: 10

Thanks for the quick reply Catalin.

How about overriding the function (from functions.php in the child theme) using higher priority?
I tried the following code (screenshot) and it’s working well, not loading any of the default files, but I’m unsure if it could be good as a long-term solution.


function override_fonts() {
td_global::$default_google_fonts_list = array (
'653' => array(
'css_style_id' => 'google_font_work_sans',
'url' => td_global::$http_or_https . '://fonts.googleapis.com/css?family=Work+Sans:400,700'
),
'654' => array(
'css_style_id' => 'google_font_bitter',
'url' => td_global::$http_or_https . '://fonts.googleapis.com/css?family=Bitter:400,700'
),
);
}
add_action( 'init', 'override_fonts', 20 );

↑ Replace default fonts (Open Sans and Roboto) with custom ones (Works Sans and Bitter, also from Google)

Post count: 23312

Hello Chucho,

In principle should not be the problem with your code. I have tested on my side in child theme function.php and the new fonts will be overwritten by the child theme properly.
Thank you for for your solution because it might be more useful for many users.

Thank you for the message!

Post count: 10

Great! Happy to help 😉

Post count: 2

Adding another vote for simple global override for default font. Thanks!

Post count: 2

Good!

Post count: 97

another vote for this, it refers to “Default Font” but nowhere can you actually change it other than via CSS file.

Post count: 11

Yes just spent half hour looking for this option please add it thank you

Post count: 6

Hi there, just wanted to add another request for global change to default font. Appreciate that the developers need to prioritise changes, but fonts are an essential part of a business’s brand. Therefore they need to be changed, and it’s crazy that you need to change every single appearance of a font element.

Post count: 22

I used the previous code changing fonts to ubuntu and montserrat but now my css file looks like this:

https://pastebin.com/dCXHXvFy

What’s the cause?
Thanks,
Francesco

  • This reply was modified 8 years by Bogdan B..
Post count: 20688

Hi,

When you click on the google fonts link, you will see all the available sub-sets but that does not mean they are all loaded. Only the necessary fonts will be picked from that list. More information in this topic
https://forum.tagdiv.com/topic/google-fonts-keep-loads-all-subsets/

Thanks

Post count: 4

I vote for global change in font as well (and avoiding loading fonts which are not used, the theme is already fairly heavy). Every other professional theme I use have this function, I can’t believe here you need to change, comment out parts, modify files etc…

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