简体   繁体   中英

Convert from <svg> to .svg

I have an icon in html and I'd like to export into a .svg file, so I can add to my font-face stylesheet.

Does someone know how can I export it? Or another way to convert from to any @font-face?

Eq.

    <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
     viewBox="-240.6 138.8 142.1 107.1" enable-background="new -240.6 138.8 142.1 107.1" xml:space="preserve">
<g>
    <path fill="#404040" d="M-123.2,178.2l-9.8-25.5c0,0-1.9-7.2-11.6-7.2c-9.7,0-14.3,0-14.3,0h-21.3c0,0-4.7,0-14.3,0
        c-9.7,0-11.6,7.2-11.6,7.2l-9.8,25.5c-11.8,0-10.2,10.6-10.2,10.6v32.1h8.9v11.7c0,0,0,6.8,6.8,6.8h3.3c0,0,6,0.3,6-7
        c0-7.3,0-11.4,0-11.4h22.2h18.5h22.2c0,0,0,4.2,0,11.4c0,7.2,6,7,6,7h3.3c6.8,0,6.8-6.8,6.8-6.8v-11.7h8.9v-32.1
        C-113.1,188.8-111.4,178.2-123.2,178.2z M-208.6,203.4c-4.8,0-8.7-3.9-8.7-8.7c0-4.8,3.9-8.7,8.7-8.7c4.8,0,8.7,3.9,8.7,8.7
        C-199.9,199.5-203.8,203.4-208.6,203.4z M-160.9,177.7h-17h-29.3l7.8-21c0,0,1-3.6,5.1-3.6c4.1,0,16.5,0,16.5,0h16.8
        c0,0,12.4,0,16.5,0c4.1,0,5.1,3.6,5.1,3.6l7.8,21H-160.9z M-130.3,203.4c-4.8,0-8.7-3.9-8.7-8.7c0-4.8,3.9-8.7,8.7-8.7
        c4.8,0,8.7,3.9,8.7,8.7C-121.6,199.5-125.5,203.4-130.3,203.4z"/>
</g>
</svg>

Paste it into a text file named icon.svg and import that file to icomoon.io .

You can then hit the generate font button at the bottom and voila.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM