How to embed fonts in CSS?

后端 未结 6 1675
你的背包
你的背包 2020-11-27 04:37

I want to use some fonts and I want it to work without having this font on the client computer. I have done this but doesn\'t work:

@font-face {
    font-fam         


        
6条回答
  •  长情又很酷
    2020-11-27 05:25

    One of the best source of information on this topic is Paul Irish's Bulletproof @font-face syntax article.

    Read it and you will end with something like:

    /* definition */
    @font-face {
      font-family: EntezareZohoor2;
      src: url('fonts/EntezareZohoor2.eot');
      src: url('fonts/EntezareZohoor2.eot?') format('☺'),
           url('fonts/EntezareZohoor2.woff') format('woff'),
           url('fonts/EntezareZohoor2.ttf') format('truetype');
      font-weight: normal;
      font-style: normal;
    }
    
    /* use */
    body {
        font-family: EntezareZohoor2, Tahoma, serif;
    }
    

提交回复
热议问题