htmlcssfont-family

How to change font-family for particular language automatically using concepts of ASCII Code Charecters?


I'm Using two languages on my website that is English and Marathi, sometimes I use mix combination of Marathi and English in a single line so I can't divide them using any class or ID each time Eg.HTML CSS किंवा Javascript,PHP वापरून भाषा कशी बदलायची? I read one solution like

@font-face {   
    font-family: BBCBengali;
    src: url(fonts/BBCBengali.ttf) format("opentype");
    unicode-range: U+00-FF, U+980-9FF;
}


So I want automatic if-else(without any selector) like 
If(Unicode range for English)
{
font-family: First-font;
}
Else
{
font-family: Second Font;
}

Solution

  • Update : This Problem is Solved with Font-family: English Font, Non-English Font

    But This will not solve the issue if both languages are in the same scripts