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!
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,
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.
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!
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!
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!
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)
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!
Adding another vote for simple global override for default font. Thanks!
Yes just spent half hour looking for this option please add it thank you
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.
I used the previous code changing fonts to ubuntu and montserrat but now my css file looks like this:
What’s the cause?
Thanks,
Francesco
-
This reply was modified 8 years by
Bogdan B..
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
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…