Using @font-face with an SVG font embedded in the current HTML page

前端 未结 2 712
清酒与你
清酒与你 2020-12-31 22:50

I have a standalone HTML document I want to distribute, without any external dependencies. I\'m using a non-standard font in this document that only some of my users will ha

2条回答
  •  滥情空心
    2020-12-31 23:06

    Specify the local font name first in the css, then the embedded font name:

    p {
        font-family: MyFontLocalName, MyFontEmbeddedName;
    }
    

    http://jsfiddle.net/gilly3/xX6Bv/5/

    If the MyFontLocalName is installed on the user's computer, that font will be used, otherwise MyFontEmbeddedName will be used.

提交回复
热议问题