Can I convert embedded base64 encode font to a font file?

后端 未结 3 1200
耶瑟儿~
耶瑟儿~ 2021-01-30 11:48

I have an @font-face rule, and its look like this:

@font-face{
    font-family:\'F\';
src:url(\"\") format(\"embedded-opentype\"),
url(data:application/x-font-wo         


        
3条回答
  •  感情败类
    2021-01-30 12:22

    1. Copy:

      data:application/x-font-woff;charset=utf-8;base64,d09GRgABAA ...ETC
      
    2. Paste in your browsers address bar, press enter.

      - A save as window appear -
      
    3. Choose a folder to save to (ex: mywebsite/fonts), filename: myfont.woff

      - you now have myfont.woff in a folder -
      
    4. Include in css:

      @font-face {
         font-family: 'myfont';
         src: url('fonts/myfont.woff');
         font-weight: normal;
         font-style: normal;
      }
      
    5. Add to a class:

      .headline {
      font-family: 'myfont', Helvetica, Arial, sans-serif;
      }
      

    Done.

提交回复
热议问题