Detecting individual Unicode character support with JavaScript

后端 未结 5 791
遇见更好的自我
遇见更好的自我 2020-12-05 04:24

Is it possible to detect if the client supports a particular Unicode character or if it will be rendered as a missing glyph box?

Important: Support in as many browser

5条回答
  •  情歌与酒
    2020-12-05 05:25

    This is more of a wild idea than a real answer:

    If you could find a character which you knew would always render as a missing glyph box, you could use the same technique as this javascript font detector--render the character and the missing glyph box offscreen and compare their widths. If they're different, then you know the character is not rendering as a missing glyph box. Of course, this won't work at all for fixed-width fonts, and it could have a lot of fixed negatives for other fonts where a lot of the characters are the same width.

提交回复
热议问题