Fallback fonts on special characters

前端 未结 2 696
情话喂你
情话喂你 2020-11-30 06:56

I was wondering if it\'s possible to, when using @font-face, have a fallback setup so that if the text on my page contains characters that are not accounted for within the f

2条回答
  •  猫巷女王i
    2020-11-30 07:43

    CSS has default fallback to the system font if the specified font doesn't contain a character. You can also specify which font to fall back to.

    Example for a serif font:

    body {
        font-family: "MyNiceFontWithoutJapanesChars", "common serif font", serif;
    }
    

    As long as the fallback font has those characters your default font misses, you should be all right.

提交回复
热议问题