SVG 图标在转换为 woff 后看起来不同

SVG icon looks different after being converted to woff

我正在使用 gulp-iconfont 将一组 svg 图标转换为 woff 字体。

图标转换为字体之前如下所示:

它在 woff 文件中的显示方式:

我的gulp任务如下:

gulp.task('icon-font', function() {
  gulp.src([paths.icons + '*.svg'])
    .pipe(iconfont({
      fontName: 'icons',
      formats: ['woff'],
      timestamp: timestamp,
      appendUnicode: true
    }))
    .on('glyphs', function(glyphs, options) {
      gulp.src(paths.templates + '/_icons.scss')
        .pipe(template({ glyphs: glyphs, timestamp: timestamp }))
        .pipe(gulp.dest(paths.styles));
    })
    .pipe(gulp.dest(paths.fonts + 'icons/')
  );
});

我的 Illustrator 导出设置:

SVG代码:

<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
<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="-183 185 32 32" style="enable-background:new -183 185 32 32;" xml:space="preserve">
<g>
    <path d="M-175.6,190.5c-0.3-0.3-0.9-0.3-1.3,0c-4.7,4.7-4.7,12.4,0,17.1c0.2,0.2,0.5,0.5,0.7,0.7c0,0.1-0.1,0.2-0.1,0.3v6.7h-2.9
        c-0.5,0-0.9,0.4-0.9,0.9s0.4,0.9,0.9,0.9h7.6c0.5,0,0.9-0.4,0.9-0.9c0-0.5-0.4-0.9-0.9-0.9h-2.9v-5.7c1.8,1.1,3.9,1.6,6.1,1.6
        c3.2,0,6.3-1.3,8.5-3.5c0.2-0.2,0.3-0.4,0.3-0.6c0-0.2-0.1-0.5-0.3-0.6L-175.6,190.5z M-168.3,209.3c-2.7,0-5.3-1.1-7.3-3
        c-3.8-3.8-4-9.8-0.6-13.9l14.5,14.5C-163.5,208.5-165.9,209.3-168.3,209.3z"/>
    <path d="M-168,192.8c3.6,0,6.6,3,6.6,6.6c0,0.5,0.4,0.9,0.9,0.9c0.5,0,0.9-0.4,0.9-0.9c0-4.6-3.8-8.4-8.4-8.4
        c-0.5,0-0.9,0.4-0.9,0.9C-168.9,192.4-168.5,192.8-168,192.8z"/>
    <path d="M-157.8,189.1c-2.7-2.7-6.2-4.1-10-4.1c-0.5,0-0.9,0.4-0.9,0.9c0,0.5,0.4,0.9,0.9,0.9c3.3,0,6.4,1.3,8.7,3.6
        c2.3,2.3,3.6,5.4,3.6,8.7c0,0.5,0.4,0.9,0.9,0.9c0.5,0,0.9-0.4,0.9-0.9C-153.6,195.3-155.1,191.8-157.8,189.1z"/>
</g>
</svg>

欢迎任何想法。

更新:

根据@nfroidure 中的一些建议,我将它们全部设为 300px x 300px,现在我得到了这个并添加了以下选项 fontHeight: 16normalize: true。产生以下内容:

您的 SVG 似乎太小了。尝试增加它们的大小或使用 fontHeight (> 1000) + normalize 选项来拉伸它们。