Degrading Unicode characters for web browsers with missing fonts

前端 未结 4 1644
甜味超标
甜味超标 2021-02-18 22:01

I am using the Unicode \'CHECK MARK\' (U+2713) in a html document. I find that it renders OK in most browsers, but occasionally I encounter someone with a missing font on their

4条回答
  •  一向
    一向 (楼主)
    2021-02-18 22:59

    This is not quite what you're asking for, but it might solve your problem (assuming your goal is to output HTML without it needing to rely on outside images, etc)

    Have you considered image data URLs (also known as RFC2397): http://www.ietf.org/rfc/rfc2397.txt

    Instead of using:

    to represent a check mark, you would use:

    
    

    This won't require any particular Unicode fonts with the CHECK MARK character to be installed on the client side, BUT it won't work in Internet Explorer 7 or lower. (Internet Explorer 8, Firefox, Safari, etc. should work just fine)

提交回复
热议问题