"fallback" secondary font set up

Hello,

I have set up Google fonts in Theme Options for titles and body, but looks like browsers in Asian countries have problem with reading those fonts. Looks like a good option would be to set up alternative fonts for example:
font-family: “Lato”,kailasa,Himaraya,sans-serif

How should I do it in CSS so that it goes along with the Theme Settings?

p {
font-family: “Lato”,Kailasa,Himalaya,sans-serif;
}

h {
font-family: font-family: “Montaga”,Kailasa,Himalaya,serif;
}

Should it do the trick? And do I still keep all the options in the Theme Settings?

thank you,
beata

Hi @tashitendrel,

Thanks for reaching out.

That’s going to override the theme option’s styling regardless of country, so it’s not going to be an alternate font. I’m in Asia, would you mind providing your site’s URL and details on how can reproduce this issue?

But it could be like this,

body, a, p, h1, h2, h3, h4, h5 {
font-family: "Lato", "Montaga", Kailasa,Himalaya,sans-serif; 
}

Still not recommended has it only changes the few elements and the issue may still present on elements with has its own local font style.

Thanks!

Hello Rad,

thank you for replying. The website is dharmaebooks.org and the issue is only with Tibetan font and only in Chrom and most probably only Chinese version of Chrom. I cannot see any problem at all so my Chinese friends sent me that screenshot. Maybe Google fonts are blocked somehow?

Hi,

Yes google fonts and services are blocked in China.

You can try this fix though I am not sure if that will work.

Thanks

Thanks.
I am reading through this article, but I am not so familiar with Java scripts. Does it mean that I should try adding all the 3 scripts together:

$.getJSON('http://api.wipmania.com/jsonp?callback=?’, function (data) {
swal(‘You are from’, data.address.country);
});

function replaceGoogleCDN() {
$(‘link’).each(function(){
var $intial = $(this).attr(‘href’),
$replace = $intial.replace(’//fonts.googleapis.com/’, ‘//fonts.useso.com/’);
$(this).attr(‘href’, $replace);
});
}

$.getJSON('http://api.wipmania.com/jsonp?callback=?’, function (data) {
if ( data.address.country_code == ‘CN’ ) {
replaceGoogleCDN();
}
});

Hi again,

Yes you need to use all the 3 scripts together as they are interdependent.

Hope this helps!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.