Use custom font only if current one has not certain characters

122 Views Asked by At

I am working on a script that puts some text on a page. The text contains some unicode characters. I have custom font that has those characters, but I'd like to use my font only if the font used on a webpage does not have them. I can't controll main font of the page. I thought of something like this, but it does not work:

.someclass { font-family: inherit, 'myFont'; }

What's the proper way of doing this?

1

There are 1 best solutions below

0
Mahdyar On

I think this can help:

@font-face {
    font-family: fontname;
    src: url(address.ttf);
}